tcg/optimize: Build and use z_bits and o_bits in fold_not

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2024-12-09 21:15:37 -06:00
parent 682d6d57ba
commit d89504b047

View file

@ -2251,10 +2251,14 @@ static bool fold_nor(OptContext *ctx, TCGOp *op)
static bool fold_not(OptContext *ctx, TCGOp *op)
{
TempOptInfo *t1;
if (fold_const1(ctx, op)) {
return true;
}
return fold_masks_s(ctx, op, arg_info(op->args[1])->s_mask);
t1 = arg_info(op->args[1]);
return fold_masks_zos(ctx, op, ~t1->o_mask, ~t1->z_mask, t1->s_mask);
}
static bool fold_or(OptContext *ctx, TCGOp *op)