Skip to content

Commit 26ec76a

Browse files
committed
[NFC] One more use case for evaluatePredicate
1 parent 1067a13 commit 26ec76a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Utils/LoopPeel.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ static unsigned countToEliminateCompares(Loop &L, unsigned MaxPeelCount,
211211

212212
// Do not consider predicates that are known to be true or false
213213
// independently of the loop iteration.
214-
if (SE.isKnownPredicate(Pred, LeftSCEV, RightSCEV) ||
215-
SE.isKnownPredicate(ICmpInst::getInversePredicate(Pred), LeftSCEV,
216-
RightSCEV))
214+
if (SE.evaluatePredicate(Pred, LeftSCEV, RightSCEV))
217215
continue;
218216

219217
// Check if we have a condition with one AddRec and one non AddRec

0 commit comments

Comments
 (0)