This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Move extension type for ConstantSDNode from getCopyToRegs to HandlePHINodesInSuccessorBlocks.
ClosedPublic

Authored by craig.topper on Mar 21 2022, 1:00 PM.

Details

Summary

D122053 set the ExtendType for ConstantSDNodes in getCopyToRegs to
ZERO_EXTEND to match assumptions in ComputePHILiveOutRegInfo. PHIs
are probably not the only way ConstantSDNodeNodes can get to
getCopyToRegs.

This patch adds an ExtendType parameter to CopyValueToVirtualRegister and
has HandlePHINodesInSuccessorBlocks pass ISD::ZERO_EXTEND for ConstantInts.
This way we only affect ConstantSDNodes for PHIs.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 21 2022, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 1:00 PM
craig.topper requested review of this revision.Mar 21 2022, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 1:00 PM
Herald added a subscriber: wdng. · View Herald Transcript
RKSimon accepted this revision.Mar 30 2022, 4:03 AM

Makes sense to me

This revision is now accepted and ready to land.Mar 30 2022, 4:03 AM
This revision was landed with ongoing or failed builds.Mar 30 2022, 11:32 AM
This revision was automatically updated to reflect the committed changes.