This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Support promotion of FRAMEADDR/RETURNADDR operands
ClosedPublic

Authored by asb on Oct 15 2018, 3:41 AM.

Details

Summary

For targets where i32 is not a legal type (e.g. 64-bit RISC-V), LegalizeIntegerTypes must promote the operand.

Diff Detail

Event Timeline

asb created this revision.Oct 15 2018, 3:41 AM
efriedma accepted this revision.Oct 15 2018, 10:27 AM
efriedma added a subscriber: efriedma.

LGTM

lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
1411

Not that it actually affects the generated code, but it would probably be more clear to use ZExtPromotedInteger.

This revision is now accepted and ready to land.Oct 15 2018, 10:27 AM
asb updated this revision to Diff 174173.Nov 15 2018, 2:36 AM
asb marked an inline comment as done.

Updated to apply cleanly without fuzz and to use ZExtPromotedInteger as suggested by Eli.

The test is dependent on RV64I codegen being committed, so blocked on that landing.

This revision was automatically updated to reflect the committed changes.