mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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>
This commit is contained in:
@@ -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])) {
|
||||
|
||||
Reference in New Issue
Block a user