diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp index d2a2e40..a7dc34f 100644 --- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp @@ -259,8 +259,10 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) { return false; // Anything ScalarEvolution may know about this loop or the PHI nodes - // in its header will soon be invalidated, and it can also affect its parent - // loops as well. + // in its header will soon be invalidated. We should also invalidate + // all outer loops because insertion and deletion of blocks that happens + // during the rotation may violate invariants related to backedge taken + // infos in them. if (SE) SE->forgetTopmostLoop(L); |