This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG][RISCV] Make RegsForValue::getCopyToRegs explicitly zero_extend constants.
ClosedPublic

Authored by craig.topper on Mar 18 2022, 6:39 PM.

Details

Summary

ComputePHILiveOutRegInfo assumes that constant incoming values to
Phis will be zero extended if they aren't a legal type. To guarantee
that we should zero_extend rather than any_extend constants.

This fixes a bug for RISCV where any_extend of constants can be
treated as a sign_extend.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 18 2022, 6:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 6:39 PM
craig.topper requested review of this revision.Mar 18 2022, 6:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 6:39 PM
RKSimon accepted this revision.Mar 19 2022, 3:09 PM

LGTM

This revision is now accepted and ready to land.Mar 19 2022, 3:09 PM
This revision was landed with ongoing or failed builds.Mar 19 2022, 6:43 PM
This revision was automatically updated to reflect the committed changes.