tcg/optimize: Use fold_masks_s in fold_not

Avoid the use of the OptContext slots.

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-08 20:27:02 -06:00
parent 2b7b695757
commit 608e75fc0c

View file

@ -2073,12 +2073,7 @@ static bool fold_not(OptContext *ctx, TCGOp *op)
if (fold_const1(ctx, op)) {
return true;
}
ctx->s_mask = arg_info(op->args[1])->s_mask;
/* Because of fold_to_not, we want to always return true, via finish. */
finish_folding(ctx, op);
return true;
return fold_masks_s(ctx, op, arg_info(op->args[1])->s_mask);
}
static bool fold_or(OptContext *ctx, TCGOp *op)