tcg/optimize: INDEX_op_mul is commutative
Cc: qemu-stable@nongnu.org Fixes: 7a2f7084525 ("tcg/optimize: Sink commutative operand swapping into fold functions") Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson committed
Aug 11, 2026 at 15:51 UTC
3181e53c13a1a68e2b54c94b1766f8e384c01b4c
1 file changed
+1
-1
tcg/optimize.c
+1
-1
@@ -2152,7 +2152,7 @@ static bool fold_movcond(OptContext *ctx, TCGOp *op)
2152
2153
static bool fold_mul(OptContext *ctx, TCGOp *op)
2154
{
2155
- if (fold_const2(ctx, op) ||
2155
+ if (fold_const2_commutative(ctx, op) ||
2156
fold_xi_to_i(ctx, op, 0) ||
2157
fold_xi_to_x(ctx, op, 1)) {
2158
return true;