This is an archive of the discontinued LLVM Phabricator instance.

[LCSSA] Post-process PHI-nodes created by SSAUpdate when constructing LCSSA form.
ClosedPublic

Authored by mzolotukhin on Jul 5 2016, 9:12 AM.

Details

Summary

SSAUpdate might insert PHI-nodes inside loops, which can break LCSSA
form unless we fix it up.

This fixes PR28424.

Diff Detail

Event Timeline

mzolotukhin updated this revision to Diff 62761.Jul 5 2016, 9:12 AM
mzolotukhin retitled this revision from to [LCSSA] Post-process PHI-nodes created by SSAUpdate when constructing LCSSA form..
mzolotukhin updated this object.
mzolotukhin added reviewers: sanjoy, chandlerc, hfinkel.
mzolotukhin added a subscriber: llvm-commits.

The patch at least solves my original problem and I haven't seen anything breaking with it during the limited testing i've done so far.

chandlerc accepted this revision.Jul 15 2016, 2:07 PM
chandlerc edited edge metadata.

LGTM, this makes perfect sense.

test/Transforms/LCSSA/pr28424.ll
4

Maybe actually explain the particular patterns you're testing here?

This revision is now accepted and ready to land.Jul 15 2016, 2:07 PM
This revision was automatically updated to reflect the committed changes.

Thanks for taking a look, Chandler!

Michael