decomp-permuter
decomp-permuter copied to clipboard
Break multiply into multiply + shift
This scratch shows an example where x * 0x500
produces different codegen from (x * 5) << 8
.
Looking at the asm you can see that the ops are the same, but it affects other code:
a8: sll t4,t3,0x2
ac: addu t4,t4,t3
b0: sll t5,t4,0x8
Therefore, it would be nice if permuter broke these math operations up (probably just for IDO?).