qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 09/46] tcg/optimize: Use fold_masks_z in fold_count_zeros


From: Richard Henderson
Subject: [PATCH 09/46] tcg/optimize: Use fold_masks_z in fold_count_zeros
Date: Tue, 10 Dec 2024 09:23:24 -0600

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/optimize.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tcg/optimize.c b/tcg/optimize.c
index 3363ebd48c..c97ec10989 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1088,7 +1088,6 @@ static bool fold_masks_zs(OptContext *ctx, TCGOp *op,
     return fold_masks_zsa(ctx, op, z_mask, s_mask, -1);
 }
 
-__attribute__((unused))
 static bool fold_masks_z(OptContext *ctx, TCGOp *op, uint64_t z_mask)
 {
     return fold_masks_zsa(ctx, op, z_mask, smask_from_zmask(z_mask), -1);
@@ -1592,9 +1591,9 @@ static bool fold_count_zeros(OptContext *ctx, TCGOp *op)
     default:
         g_assert_not_reached();
     }
-    ctx->z_mask = arg_info(op->args[2])->z_mask | z_mask;
-    ctx->s_mask = smask_from_zmask(ctx->z_mask);
-    return false;
+    z_mask |= arg_info(op->args[2])->z_mask;
+
+    return fold_masks_z(ctx, op, z_mask);
 }
 
 static bool fold_ctpop(OptContext *ctx, TCGOp *op)
-- 
2.43.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]