aboutsummaryrefslogtreecommitdiff
path: root/tcg/optimize.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2012-09-06 16:47:14 +0200
committerAurelien Jarno <aurelien@aurel32.net>2012-09-11 18:05:57 +0200
commit61251c0c790d0a63468c8e3eb2767c1f4bf3654a (patch)
tree4185b54fc463c60cf5d662991102d0468b9637bb /tcg/optimize.c
parent38ee188b1b63606191c013046add021bdc6f1bfd (diff)
downloadqemu-61251c0c790d0a63468c8e3eb2767c1f4bf3654a.zip
qemu-61251c0c790d0a63468c8e3eb2767c1f4bf3654a.tar.gz
qemu-61251c0c790d0a63468c8e3eb2767c1f4bf3654a.tar.bz2
tcg/optimize: simplify and r, a, 0 cases
and r, a, 0 is equivalent to a movi r, 0. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/optimize.c')
-rw-r--r--tcg/optimize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 0db849e..c12cb2b 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -360,6 +360,7 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
/* Simplify expression for "op r, a, 0 => movi r, 0" cases */
switch (op) {
+ CASE_OP_32_64(and):
CASE_OP_32_64(mul):
if ((temps[args[2]].state == TCG_TEMP_CONST
&& temps[args[2]].val == 0)) {