]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg/optimize: prefer the "op a, a, b" form for commutative ops
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 19 Sep 2012 20:00:22 +0000 (22:00 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 06:42:10 +0000 (01:42 -0500)
commitcfca711212fb5a99104897a593e9ea45f140a0a2
tree679f44aae8c90ff3c175af70ee3962fc628811d9
parent26adaf07da61b9bd92cb49430611ffe5a0ca3cfd
tcg/optimize: prefer the "op a, a, b" form for commutative ops

The "op a, a, b" form is better handled on non-RISC host than the "op
a, b, a" form, so swap the arguments to this form when possible, and
when b is not a constant.

This reduces the number of generated instructions by a tiny bit.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
tcg/optimize.c