This is an archive of the discontinued LLVM Phabricator instance.

[CodeGenPrep] Handle constants in ConvertPhiType
ClosedPublic

Authored by dmgreen on Oct 10 2022, 1:17 AM.

Details

Summary

This is a simple addition to the convertPhiTypes in CodeGenPrepare to consider and convert constants as it converts the phi type. Someone fixed the bug in the motivating example, so the undef is now a constant 0. This does mean converting between integer and floating point constants, which may have different materialization.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 10 2022, 1:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 1:17 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
dmgreen requested review of this revision.Oct 10 2022, 1:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 1:17 AM
RKSimon retitled this revision from [CodeGenPrep] Handle contants in ConvertPhiType to [CodeGenPrep] Handle constants in ConvertPhiType.Oct 10 2022, 5:26 AM

Can you pre-commit the tests now?

dmgreen updated this revision to Diff 467403.Oct 13 2022, 2:02 AM

Thanks - Rebase over precommitted tests.

RKSimon accepted this revision.Oct 13 2022, 3:38 AM

LGTM

This revision is now accepted and ready to land.Oct 13 2022, 3:38 AM
This revision was landed with ongoing or failed builds.Oct 13 2022, 8:42 AM
This revision was automatically updated to reflect the committed changes.