This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Emit more precise AssertZext/AssertSext nodes.
ClosedPublic

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

Details

Summary

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

Repository
rL LLVM

Event Timeline

efriedma created this revision.Jul 5 2018, 6:32 PM
arsenm added inline comments.Jul 6 2018, 5:14 AM
test/CodeGen/AMDGPU/frame-index-elimination.ll
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

LGTM

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.