[llvm] ffa5a40 - [IndVars] Remove redundant loop invariance check (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat May 1 08:22:08 PDT 2021
Author: Nikita Popov
Date: 2021-05-01T17:22:00+02:00
New Revision: ffa5a402a93bcd3aa08a9ff97765f2a056829939
URL: https://github.com/llvm/llvm-project/commit/ffa5a402a93bcd3aa08a9ff97765f2a056829939
DIFF: https://github.com/llvm/llvm-project/commit/ffa5a402a93bcd3aa08a9ff97765f2a056829939.diff
LOG: [IndVars] Remove redundant loop invariance check (NFC)
This is checked again directly below this condition.
Added:
Modified:
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 295ec0529bdcc..64ae2b3138fbd 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1565,9 +1565,6 @@ bool IndVarSimplify::predicateLoopExits(Loop *L, SCEVExpander &Rewriter) {
if (!LoopPredication)
return false;
- if (!SE->hasLoopInvariantBackedgeTakenCount(L))
- return false;
-
// Note: ExactBTC is the exact backedge taken count *iff* the loop exits
// through *explicit* control flow. We have to eliminate the possibility of
// implicit exits (see below) before we know it's truly exact.
More information about the llvm-commits
mailing list