Page MenuHomePhabricator

[CodeGen] Emit more precise AssertZext/AssertSext nodes.

Authored by efriedma on Jul 5 2018, 6:32 PM.



This is marginally helpful for removing redundant extensions, and it's easier to read, so it seems like an all-around win. In the new test i8-phi-ext.ll, we used to emit an AssertSext i8; now we emit an AssertZext i2, which allows the extension of the return value to be eliminated.

Someone familiar with the AMDGPU backend should review the test change there; I'm not sure why this change makes a difference. (We now emit an AssertZext i27 for the stack address.)

Diff Detail


Event Timeline

efriedma created this revision.Jul 5 2018, 6:32 PM
arsenm added inline comments.Jul 6 2018, 5:14 AM
143 ↗(On Diff #154343)

This probably makes sense. We can't use the constant offset addressing mode if we don't know if the base address is >= 0

dmgreen added a subscriber: dmgreen.Jul 6 2018, 6:37 AM
arsenm accepted this revision.Jul 9 2018, 3:04 AM


This revision is now accepted and ready to land.Jul 9 2018, 3:04 AM
This revision was automatically updated to reflect the committed changes.