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