diff mbox series

[v3,42/48] tcg/optimize: Add more simplifications for orc

Message ID 20211021210539.825582-43-richard.henderson@linaro.org
State New
Headers show
Series tcg: optimize redundant sign extensions | expand

Commit Message

Richard Henderson Oct. 21, 2021, 9:05 p.m. UTC
Two simplifications that were missing from before the split
to fold functions, and are now easy to provide.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 tcg/optimize.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.25.1

Comments

Alex Bennée Oct. 26, 2021, 4:22 p.m. UTC | #1
Richard Henderson <richard.henderson@linaro.org> writes:

> Two simplifications that were missing from before the split

> to fold functions, and are now easy to provide.

>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


-- 
Alex Bennée
diff mbox series

Patch

diff --git a/tcg/optimize.c b/tcg/optimize.c
index 92b35a8c3f..dc7744d41a 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1561,6 +1561,8 @@  static bool fold_or(OptContext *ctx, TCGOp *op)
 static bool fold_orc(OptContext *ctx, TCGOp *op)
 {
     if (fold_const2(ctx, op) ||
+        fold_xx_to_i(ctx, op, -1) ||
+        fold_xi_to_x(ctx, op, -1) ||
         fold_xi_to_not(ctx, op, 0)) {
         return true;
     }