Message ID | 20241210152401.1823648-19-richard.henderson@linaro.org (mailing list archive) |
---|---|
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 | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/tcg/optimize.c b/tcg/optimize.c > index 5d10e704a7..260e3ea072 100644 > --- a/tcg/optimize.c > +++ b/tcg/optimize.c > @@ -1804,7 +1804,7 @@ static bool fold_exts(OptContext *ctx, TCGOp *op) > > static bool fold_extu(OptContext *ctx, TCGOp *op) > { > - uint64_t z_mask_old, z_mask; > + uint64_t z_mask_old, z_mask, s_mask, a_mask = -1; > bool type_change = false; > > if (fold_const1(ctx, op)) { > @@ -1835,12 +1835,12 @@ static bool fold_extu(OptContext *ctx, TCGOp *op) > g_assert_not_reached(); > } > > - ctx->z_mask = z_mask; > - ctx->s_mask = smask_from_zmask(z_mask); > + s_mask = smask_from_zmask(z_mask); > if (!type_change) { > - ctx->a_mask = z_mask_old ^ z_mask; > + a_mask = z_mask_old ^ z_mask; > } > - return fold_masks(ctx, op); > + > + return fold_masks_zsa(ctx, op, z_mask, s_mask, a_mask); > } > > static bool fold_mb(OptContext *ctx, TCGOp *op) Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff --git a/tcg/optimize.c b/tcg/optimize.c index 5d10e704a7..260e3ea072 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1804,7 +1804,7 @@ static bool fold_exts(OptContext *ctx, TCGOp *op) static bool fold_extu(OptContext *ctx, TCGOp *op) { - uint64_t z_mask_old, z_mask; + uint64_t z_mask_old, z_mask, s_mask, a_mask = -1; bool type_change = false; if (fold_const1(ctx, op)) { @@ -1835,12 +1835,12 @@ static bool fold_extu(OptContext *ctx, TCGOp *op) g_assert_not_reached(); } - ctx->z_mask = z_mask; - ctx->s_mask = smask_from_zmask(z_mask); + s_mask = smask_from_zmask(z_mask); if (!type_change) { - ctx->a_mask = z_mask_old ^ z_mask; + a_mask = z_mask_old ^ z_mask; } - return fold_masks(ctx, op); + + return fold_masks_zsa(ctx, op, z_mask, s_mask, a_mask); } static bool fold_mb(OptContext *ctx, TCGOp *op)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)