Message ID | 20241210152401.1823648-10-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | tcg: Remove in-flight mask data from OptContext | expand |
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>
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)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)