Blame 0020-tcg-optimize-simplify-and-r-a-0-cases.patch

5544c1
From f08c59ce7dee67a95cf06d9588b4312e7d071788 Mon Sep 17 00:00:00 2001
5544c1
From: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Date: Thu, 6 Sep 2012 16:47:14 +0200
5544c1
Subject: [PATCH] tcg/optimize: simplify and r, a, 0 cases
5544c1
5544c1
and r, a, 0 is equivalent to a movi r, 0.
5544c1
5544c1
Reviewed-by: Richard Henderson <rth@twiddle.net>
5544c1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 tcg/optimize.c | 1 +
5544c1
 1 file changed, 1 insertion(+)
5544c1
5544c1
diff --git a/tcg/optimize.c b/tcg/optimize.c
5544c1
index 0db849e..c12cb2b 100644
5544c1
--- a/tcg/optimize.c
5544c1
+++ b/tcg/optimize.c
5544c1
@@ -360,6 +360,7 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
5544c1
 
5544c1
         /* Simplify expression for "op r, a, 0 => movi r, 0" cases */
5544c1
         switch (op) {
5544c1
+        CASE_OP_32_64(and):
5544c1
         CASE_OP_32_64(mul):
5544c1
             if ((temps[args[2]].state == TCG_TEMP_CONST
5544c1
                 && temps[args[2]].val == 0)) {
5544c1
-- 
5544c1
1.7.12.1
5544c1