[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 50/60] tcg/optimize: Use fold_xi_to_x for mul
From: |
Richard Henderson |
Subject: |
[PULL v2 50/60] tcg/optimize: Use fold_xi_to_x for mul |
Date: |
Thu, 28 Oct 2021 21:33:19 -0700 |
Recognize the identity function for low-part multiply.
Suggested-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
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 6d795954f2..907049fb06 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1461,7 +1461,8 @@ static bool fold_movcond(OptContext *ctx, TCGOp *op)
static bool fold_mul(OptContext *ctx, TCGOp *op)
{
if (fold_const2(ctx, op) ||
- fold_xi_to_i(ctx, op, 0)) {
+ fold_xi_to_i(ctx, op, 0) ||
+ fold_xi_to_x(ctx, op, 1)) {
return true;
}
return false;
--
2.25.1
- [PULL v2 48/60] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values, (continued)
- [PULL v2 48/60] tcg/optimize: Stop forcing z_mask to "garbage" for 32-bit values, Richard Henderson, 2021/10/29
- [PULL v2 60/60] softmmu: fix for "after access" watchpoints, Richard Henderson, 2021/10/29
- [PULL v2 44/60] tcg/optimize: Expand fold_mulu2_i32 to all 4-arg multiplies, Richard Henderson, 2021/10/29
- [PULL v2 47/60] tcg: Extend call args using the correct opcodes, Richard Henderson, 2021/10/29
- [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 <=
- [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, 2021/10/29
- [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