]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg/optimize: Build and use z_bits and o_bits in fold_not
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 10 Dec 2024 03:15:37 +0000 (21:15 -0600)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 30 Jun 2025 13:42:37 +0000 (07:42 -0600)
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/optimize.c

index 29d1f29124e5f1d491c3a3c4311eed53742fce54..d22396f6d723e245e5d916d98abb24fd7462a240 100644 (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)