diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp index ce13723..1a9eaf24 100644 --- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp @@ -795,6 +795,11 @@ bool LoopRotate::simplifyLoopLatch(Loop *L) { MergeBlockIntoPredecessor(Latch, &DTU, LI, MSSAU, nullptr, /*PredecessorWithTwoSuccessors=*/true); + if (SE) { + // Merging blocks may remove blocks reference in the block disposition cache. Clear the cache. + SE->forgetBlockAndLoopDispositions(); + } + if (MSSAU && VerifyMemorySSA) MSSAU->getMemorySSA()->verifyMemorySSA(); |