This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add sext(constant) -> constant artifact combine.
ClosedPublic

Authored by aemerson on Jan 29 2021, 10:52 PM.

Details

Summary

This is the G_SEXT counterpart to the existing G_ZEXT/G_ANYEXT combines.

Diff Detail

Event Timeline

aemerson created this revision.Jan 29 2021, 10:52 PM
aemerson requested review of this revision.Jan 29 2021, 10:52 PM
arsenm accepted this revision.Jan 30 2021, 6:57 AM
arsenm added inline comments.
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
199

This seems like a fixable defect. You can check for any constant with the IR one

This revision is now accepted and ready to land.Jan 30 2021, 6:57 AM
aemerson added inline comments.Feb 3 2021, 1:52 PM
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
199

Yeah, we can already use m_ICst but it doesn't save much code, we need the MachineInstr def anyway. I'll remove this comment from here and the other places.

This revision was landed with ongoing or failed builds.Feb 3 2021, 2:10 PM
This revision was automatically updated to reflect the committed changes.