diff options
author | Richard Henderson <rth@twiddle.net> | 2014-01-28 13:26:17 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2014-02-17 10:12:29 -0600 |
commit | e64e958e202c563730159c52f7c9116c80ceca52 (patch) | |
tree | a267019fdf59786d6c8b3749044de169dceb2563 /tcg/optimize.c | |
parent | e201b56418a5bb6afadc42df16f94880c091fad4 (diff) | |
download | qemu-e64e958e202c563730159c52f7c9116c80ceca52.zip |
tcg/optimize: Optmize ANDC X,Y,Y to MOV X,0
Like we already do for SUB and XOR.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/optimize.c')
-rw-r--r-- | tcg/optimize.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index 0b1dd13a63..c1b9284600 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -947,6 +947,7 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr, /* Simplify expression for "op r, a, a => movi r, 0" cases */ switch (op) { + CASE_OP_32_64(andc): CASE_OP_32_64(sub): CASE_OP_32_64(xor): if (temps_are_copies(args[1], args[2])) { |