aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2022-10-11 15:25:27 +0100
committerFlorian Hahn <flo@fhahn.com>2022-10-11 15:25:27 +0100
commitbe611ef7faedd5e1f23975598840ccb2018bc100 (patch)
treee9b8a683fac116d032347a5a4874844fe64c9f14 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parentca76759b0567a3ca7c3b7a3ddc47d79297c73952 (diff)
downloadllvm-be611ef7faedd5e1f23975598840ccb2018bc100.zip
llvm-be611ef7faedd5e1f23975598840ccb2018bc100.tar.gz
llvm-be611ef7faedd5e1f23975598840ccb2018bc100.tar.bz2
[LoopRotation] Also drop block dispositions.
LoopRotation may also fold basic blocks, so cached block dispositions also need to be dropped. Fixes #58291.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index da817fb..ce13723 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -349,7 +349,9 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
SE->forgetTopmostLoop(L);
// We may hoist some instructions out of loop. In case if they were cached
// as "loop variant" or "loop computable", these caches must be dropped.
- SE->forgetLoopDispositions();
+ // We also may fold basic blocks, so cached block dispositions also need
+ // to be dropped.
+ SE->forgetBlockAndLoopDispositions();
}
LLVM_DEBUG(dbgs() << "LoopRotation: rotating "; L->dump());