diff mbox series

[PULL,v2,49/60] tcg/optimize: Use fold_xx_to_i for orc

Message ID 20211029043329.1518029-50-richard.henderson@linaro.org
State Accepted
Commit 4e858d96aa3997113014a31afabcf95fb36d2860
Headers show
Series tcg patch queue | expand

Commit Message

Richard Henderson Oct. 29, 2021, 4:33 a.m. UTC
Recognize the constant function for or-complement.

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

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 | 1 +
 1 file changed, 1 insertion(+)

-- 
2.25.1
diff mbox series

Patch

diff --git a/tcg/optimize.c b/tcg/optimize.c
index e0abf769d0..6d795954f2 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1586,6 +1586,7 @@  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_ix_to_not(ctx, op, 0)) {
         return true;