tcg/optimize: swap brcond/setcond arguments when possible
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Sep 2012 14:47:14 +0000 (16:47 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 11 Sep 2012 16:05:59 +0000 (18:05 +0200)
commit65a7cce17ddf6fa1a30d4315da1631d9b6c8fd31
tree3256ee3596c8d224aaa70e9616a0bb7e9f570164
parent01ee5282ea955dee4e189b34ef888be6f36d9861
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>
tcg/optimize.c