decomp-permuter icon indicating copy to clipboard operation
decomp-permuter copied to clipboard

Break multiply into multiply + shift

Open mkst opened this issue 1 year ago • 0 comments

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?).

mkst avatar Jul 05 '23 17:07 mkst