[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/46] tcg/optimize: Use fold_masks_zsa in fold_exts
From: |
Richard Henderson |
Subject: |
[PATCH 17/46] tcg/optimize: Use fold_masks_zsa in fold_exts |
Date: |
Tue, 10 Dec 2024 09:23:32 -0600 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index a0ccf7f3f2..5d10e704a7 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1759,7 +1759,7 @@ static bool fold_extract2(OptContext *ctx, TCGOp *op)
static bool fold_exts(OptContext *ctx, TCGOp *op)
{
- uint64_t s_mask_old, s_mask, z_mask, sign;
+ uint64_t s_mask_old, s_mask, z_mask, a_mask = -1, sign;
bool type_change = false;
if (fold_const1(ctx, op)) {
@@ -1795,13 +1795,11 @@ static bool fold_exts(OptContext *ctx, TCGOp *op)
}
s_mask |= sign << 1;
- ctx->z_mask = z_mask;
- ctx->s_mask = s_mask;
if (!type_change) {
- ctx->a_mask = s_mask & ~s_mask_old;
+ a_mask = s_mask & ~s_mask_old;
}
- return fold_masks(ctx, op);
+ return fold_masks_zsa(ctx, op, z_mask, s_mask, a_mask);
}
static bool fold_extu(OptContext *ctx, TCGOp *op)
--
2.43.0
- Re: [PATCH 26/46] tcg/optimize: Use fold_masks_zs in fold_orc, (continued)
- [PATCH 23/46] tcg/optimize: Use fold_masks_zs in fold_nor, Richard Henderson, 2024/12/10
- [PATCH 27/46] tcg/optimize: Use fold_masks_zs in fold_qemu_ld, Richard Henderson, 2024/12/10
- [PATCH 14/46] tcg/optimize: Use fold_masks_zs in fold_eqv, Richard Henderson, 2024/12/10
- [PATCH 15/46] tcg/optimize: Use fold_masks_zsa in fold_extract, Richard Henderson, 2024/12/10
- [PATCH 17/46] tcg/optimize: Use fold_masks_zsa in fold_exts,
Richard Henderson <=
- [PATCH 22/46] tcg/optimize: Use fold_masks_z in fold_neg_no_const, Richard Henderson, 2024/12/10
- [PATCH 13/46] tcg/optimize: Use finish_folding in fold_dup, fold_dup2, Richard Henderson, 2024/12/10
- [PATCH 21/46] tcg/optimize: Use fold_masks_zs in fold_nand, Richard Henderson, 2024/12/10
- [PATCH 24/46] tcg/optimize: Use fold_masks_zs in fold_not, Richard Henderson, 2024/12/10
- [PATCH 25/46] tcg/optimize: Use fold_masks_zs in fold_or, Richard Henderson, 2024/12/10