This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Handle and/or in applyLoopGuards()
ClosedPublic

Authored by nikic on May 1 2021, 8:15 AM.

Details

Summary

applyLoopGuards() already combines conditions from multiple nested guards. However, it cannot use multiple conditions on the same guard, combined using and/or. Add support for this by recursion into either and or or, depending on the direction of the branch.

Diff Detail

Event Timeline

nikic created this revision.May 1 2021, 8:15 AM
nikic requested review of this revision.May 1 2021, 8:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2021, 8:15 AM
reames accepted this revision.May 9 2021, 9:24 AM

LGTM

This revision is now accepted and ready to land.May 9 2021, 9:24 AM
fhahn accepted this revision.May 9 2021, 11:20 AM

LGTM, thanks! I think it might be good to also test some combinations with 2 chained ANDs/ORs and perhaps AND/OR mixed, but perhaps I missed something like that.

This revision was automatically updated to reflect the committed changes.