From: Aurelien Jarno Date: Thu, 6 Sep 2012 14:47:14 +0000 (+0200) Subject: tcg/optimize: simplify and r, a, 0 cases X-Git-Tag: v1.2.1~222 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f66f1dab29c86f88e5904eb628b90b1be8aed61a;p=thirdparty%2Fqemu.git tcg/optimize: simplify and r, a, 0 cases and r, a, 0 is equivalent to a movi r, 0. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno Signed-off-by: Michael Roth --- diff --git a/tcg/optimize.c b/tcg/optimize.c index 0db849edbfd..c12cb2bc4b2 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)) {