From 76f6bf2a288762f49978d6cd24625d2aefd24d29 Mon Sep 17 00:00:00 2001 From: Max Kazantsev Date: Tue, 24 Apr 2018 02:08:05 +0000 Subject: [PATCH] [NFC] Add clarification comment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330677 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/LoopRotationUtils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Utils/LoopRotationUtils.cpp b/lib/Transforms/Utils/LoopRotationUtils.cpp index d2a2e40518f..a7dc34f24eb 100644 --- a/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/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);