DescriptionSubzero: Fold the load instruction into the next cast instruction.
This is similar to the way a load instruction may be folded into the next arithmetic instruction.
Usually the effect is to improve a sequence like:
mov ax, WORD PTR [mem]
movsx eax, ax
into this:
movsx eax, WORD PTR [mem]
without actually improving register allocation, though other kinds of casts may have different improvements.
Existing tests needed to be fixed when they "inadvertently" did a cast to i32 return type and triggered the optimization when it wasn't wanted. These were fixed by inserting a "dummy" instruction between the load and the cast.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4095
R=jvoung@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=c77f817f923b2fcbf043da76e1a3066f7729aef2
Patch Set 1 #
Total comments: 2
Patch Set 2 : Code review changes #
Messages
Total messages: 5 (1 generated)
|