This is an archive of the discontinued LLVM Phabricator instance.

[Loop Predication] Teach LP about reverse loops with uge and sge latch conditions
ClosedPublic

Authored by skatkov on Feb 2 2018, 2:26 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

skatkov created this revision.Feb 2 2018, 2:26 AM
anna added inline comments.Feb 6 2018, 2:23 PM
lib/Transforms/Scalar/LoopPredication.cpp
451 ↗(On Diff #132550)

pls land this as a separate NFC after separating out getLatchPredicateForGuard.

skatkov updated this revision to Diff 133160.Feb 7 2018, 12:19 AM

Please take a look.

anna accepted this revision.Feb 7 2018, 4:28 AM

LGTM.
Btw, I actually meant separating out getLatchPredicateForGuard as NFC for just the conditions supported without this change (i.e. everything except SGE, UGE).
Then, in this change, adding support for UGE and SGE in that function and in IsUnsupportedPredicate, so that only changes related to SGE/UGE are in this patch :)

This revision is now accepted and ready to land.Feb 7 2018, 4:28 AM
This revision was automatically updated to reflect the committed changes.