[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
- [PATCH 04/46] tcg/optimize: Use finish_folding in fold_add, fold_add_vec, (continued)
- [PATCH 04/46] tcg/optimize: Use finish_folding in fold_add, fold_add_vec, Richard Henderson, 2024/12/10
- [PATCH 05/46] tcg/optimize: Use finish_folding in fold_addsub2, Richard Henderson, 2024/12/10
- [PATCH 06/46] tcg/optimize: Use fold_masks_zsa in fold_and, Richard Henderson, 2024/12/10
- [PATCH 07/46] tcg/optimize: Use fold_masks_zsa in fold_andc, Richard Henderson, 2024/12/10
- [PATCH 08/46] tcg/optimize: Use fold_masks_zs in fold_bswap, Richard Henderson, 2024/12/10
- [PATCH 09/46] tcg/optimize: Use fold_masks_z in fold_count_zeros,
Richard Henderson <=
- [PATCH 10/46] tcg/optimize: Use fold_masks_z in fold_ctpop, Richard Henderson, 2024/12/10
- [PATCH 12/46] tcg/optimize: Use finish_folding in fold_divide, Richard Henderson, 2024/12/10
- [PATCH 11/46] tcg/optimize: Use fold_and and fold_masks_z in fold_deposit, Richard Henderson, 2024/12/10
- [PATCH 18/46] tcg/optimize: Use fold_masks_zsa in fold_extu, Richard Henderson, 2024/12/10
- [PATCH 16/46] tcg/optimize: Use finish_folding in fold_extract2, Richard Henderson, 2024/12/10