diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-12-08 20:25:21 -0600 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-12-24 08:32:15 -0800 |
commit | 2b7b69575733d5568e86d850a1c17e3414be974b (patch) | |
tree | 82e00fc3d8e8a75456e159945f0822d211c39ca1 | |
parent | d151fd34b090ddb40b073f1bd2ac4c893a67d1eb (diff) | |
download | qemu-2b7b69575733d5568e86d850a1c17e3414be974b.zip qemu-2b7b69575733d5568e86d850a1c17e3414be974b.tar.gz qemu-2b7b69575733d5568e86d850a1c17e3414be974b.tar.bz2 |
tcg/optimize: Use fold_masks_s in fold_nor
Avoid the use of the OptContext slots.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | tcg/optimize.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index fbaaece..acff398 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2056,14 +2056,16 @@ static bool fold_neg(OptContext *ctx, TCGOp *op) static bool fold_nor(OptContext *ctx, TCGOp *op) { + uint64_t s_mask; + if (fold_const2_commutative(ctx, op) || fold_xi_to_not(ctx, op, 0)) { return true; } - ctx->s_mask = arg_info(op->args[1])->s_mask - & arg_info(op->args[2])->s_mask; - return false; + s_mask = arg_info(op->args[1])->s_mask + & arg_info(op->args[2])->s_mask; + return fold_masks_s(ctx, op, s_mask); } static bool fold_not(OptContext *ctx, TCGOp *op) |