[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 56/60] tcg/optimize: Propagate sign info for bit counting
From: |
Richard Henderson |
Subject: |
[PULL v2 56/60] tcg/optimize: Propagate sign info for bit counting |
Date: |
Thu, 28 Oct 2021 21:33:25 -0700 |
The results are generally 6 bit unsigned values, though
the count leading and trailing bits may produce any value
for a zero input.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 5fa4d7285d..c0eccc61d6 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1229,7 +1229,7 @@ static bool fold_count_zeros(OptContext *ctx, TCGOp *op)
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;
}
@@ -1249,6 +1249,7 @@ static bool fold_ctpop(OptContext *ctx, TCGOp *op)
default:
g_assert_not_reached();
}
+ ctx->s_mask = smask_from_zmask(ctx->z_mask);
return false;
}
--
2.25.1
- [PULL v2 46/60] tcg/optimize: Sink commutative operand swapping into fold functions, (continued)
- [PULL v2 46/60] tcg/optimize: Sink commutative operand swapping into fold functions, Richard Henderson, 2021/10/29
- [PULL v2 51/60] tcg/optimize: Use fold_xi_to_x for div, Richard Henderson, 2021/10/29
- [PULL v2 52/60] tcg/optimize: Use fold_xx_to_i for rem, Richard Henderson, 2021/10/29
- [PULL v2 55/60] tcg/optimize: Propagate sign info for setcond, Richard Henderson, 2021/10/29
- [PULL v2 54/60] tcg/optimize: Propagate sign info for logical operations, Richard Henderson, 2021/10/29
- [PULL v2 58/60] softmmu: fix watchpoint processing in icount mode, Richard Henderson, 2021/10/29
- [PULL v2 50/60] tcg/optimize: Use fold_xi_to_x for mul, Richard Henderson, 2021/10/29
- [PULL v2 53/60] tcg/optimize: Optimize sign extensions, Richard Henderson, 2021/10/29
- [PULL v2 49/60] tcg/optimize: Use fold_xx_to_i for orc, Richard Henderson, 2021/10/29
- [PULL v2 57/60] tcg/optimize: Propagate sign info for shifting, Richard Henderson, 2021/10/29
- [PULL v2 56/60] tcg/optimize: Propagate sign info for bit counting,
Richard Henderson <=
- [PULL v2 59/60] softmmu: remove useless condition in watchpoint check, Richard Henderson, 2021/10/29
- Re: [PULL v2 00/60] tcg patch queue, Richard Henderson, 2021/10/29