]> www.infradead.org Git - users/dwmw2/qemu.git/commit
tcg/optimize: swap brcond/setcond arguments when possible
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Sep 2012 14:47:14 +0000 (16:47 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 06:42:07 +0000 (01:42 -0500)
commitdecddd9021b417186901baec037cc9b4d75a58f6
tree8b970b4e8672f4b7ae6db3a7532ef70c05149cfc
parent52173babad7f17fc69eebe4ad3aeee42fdea0e48
tcg/optimize: swap brcond/setcond arguments when possible

brcond and setcond ops are not commutative, but it's easy to compute the
new condition after swapping the arguments. Try to always put the constant
argument in second position like for commutative ops, to help backends to
generate better code.

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