In computing a_mask, for or, we remove the bits from t1->o_mask which are known to be zero. For orc, the bits known to be zero are the inverse of those known to be one.
Cc: [email protected] Fixes: cc4033ee47c ("tcg/optimize: Build and use zero, one and affected bits in fold_orc") Reviewed-by: Pierrick Bouvier <[email protected]> Signed-off-by: Richard Henderson <[email protected]> --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 1f95da487b..db1d89396b 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2360,7 +2360,7 @@ static bool fold_orc(OptContext *ctx, TCGOp *op) s_mask = t1->s_mask & t2->s_mask; /* Affected bits are those not known one, masked by those known one. */ - a_mask = ~t1->o_mask & t2->o_mask; + a_mask = ~t1->o_mask & ~t2->o_mask; return fold_masks_zosa(ctx, op, z_mask, o_mask, s_mask, a_mask); } -- 2.43.0
