This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Fix invalid reduction for phis with repeat inputs
ClosedPublic

Authored by arsenm on Oct 6 2022, 11:10 AM.

Details

Summary

Phis have a quirk where the same predecessor block may appear multiple times
if the same block branches to it multiple ways. All the values need to match,
but this was replacing each operand independently. If an operand can be simplified,
make sure to replace every instance of the incoming block's value.

Diff Detail

Event Timeline

arsenm created this revision.Oct 6 2022, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2022, 11:10 AM
arsenm requested review of this revision.Oct 6 2022, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2022, 11:10 AM
Herald added a subscriber: wdng. · View Herald Transcript
aeubanks accepted this revision.Oct 6 2022, 11:15 AM
This revision is now accepted and ready to land.Oct 6 2022, 11:15 AM