aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
Diffstat (limited to 'tcg')
-rw-r--r--tcg/optimize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 62a128b..3638ab9 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1454,7 +1454,7 @@ static bool fold_and(OptContext *ctx, TCGOp *op)
a_mask = t1->z_mask & ~t2->o_mask;
if (!fold_masks_zosa_int(ctx, op, z_mask, o_mask, s_mask, a_mask)) {
- if (ti_is_const(t2)) {
+ if (op->opc == INDEX_op_and && ti_is_const(t2)) {
/*
* Canonicalize on extract, if valid. This aids x86 with its
* 2 operand MOVZBL and 2 operand AND, selecting the TCGOpcode