qemu-devel
[Top][All Lists]
Advanced

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

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


From: Pierrick Bouvier
Subject: Re: [PATCH 09/46] tcg/optimize: Use fold_masks_z in fold_count_zeros
Date: Tue, 17 Dec 2024 12:19:30 -0800
User-agent: Mozilla Thunderbird

On 12/10/24 07:23, Richard Henderson wrote:
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)

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>




reply via email to

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