aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopSimplify.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index f247a7e..8943b4b 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -647,19 +647,12 @@ ReprocessLoop:
Instruction *Inst = &*I++;
if (Inst == CI)
continue;
- bool InstInvariant = false;
if (!L->makeLoopInvariant(
- Inst, InstInvariant,
- Preheader ? Preheader->getTerminator() : nullptr, MSSAU)) {
+ Inst, AnyInvariant,
+ Preheader ? Preheader->getTerminator() : nullptr, MSSAU, SE)) {
AllInvariant = false;
break;
}
- if (InstInvariant && SE) {
- // The loop disposition of all SCEV expressions that depend on any
- // hoisted values have also changed.
- SE->forgetBlockAndLoopDispositions(Inst);
- }
- AnyInvariant |= InstInvariant;
}
if (AnyInvariant)
Changed = true;