[llvm] 26ec76a - [NFC] One more use case for evaluatePredicate
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 05:21:46 PDT 2021
Author: Max Kazantsev
Date: 2021-03-18T19:21:29+07:00
New Revision: 26ec76add5cf0689dc545ade9a39eef58db6e3d7
URL: https://github.com/llvm/llvm-project/commit/26ec76add5cf0689dc545ade9a39eef58db6e3d7
DIFF: https://github.com/llvm/llvm-project/commit/26ec76add5cf0689dc545ade9a39eef58db6e3d7.diff
LOG: [NFC] One more use case for evaluatePredicate
Added:
Modified:
llvm/lib/Transforms/Utils/LoopPeel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/LoopPeel.cpp b/llvm/lib/Transforms/Utils/LoopPeel.cpp
index befacb591762..cd1f6f0c78a5 100644
--- a/llvm/lib/Transforms/Utils/LoopPeel.cpp
+++ b/llvm/lib/Transforms/Utils/LoopPeel.cpp
@@ -211,9 +211,7 @@ static unsigned countToEliminateCompares(Loop &L, unsigned MaxPeelCount,
// Do not consider predicates that are known to be true or false
// independently of the loop iteration.
- if (SE.isKnownPredicate(Pred, LeftSCEV, RightSCEV) ||
- SE.isKnownPredicate(ICmpInst::getInversePredicate(Pred), LeftSCEV,
- RightSCEV))
+ if (SE.evaluatePredicate(Pred, LeftSCEV, RightSCEV))
continue;
// Check if we have a condition with one AddRec and one non AddRec
More information about the llvm-commits
mailing list