aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2020-09-29 10:38:44 +0100
committerFlorian Hahn <flo@fhahn.com>2020-09-29 10:38:44 +0100
commit60b852092c98dbdc6248d60109d90ae6f8ad841c (patch)
tree605c742ebd1ae32e4c7f687dcbc333aeee55ecf1 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent9100bd772d4ff153fd2d5cb13034f4ed8ea2d477 (diff)
downloadllvm-60b852092c98dbdc6248d60109d90ae6f8ad841c.zip
llvm-60b852092c98dbdc6248d60109d90ae6f8ad841c.tar.gz
llvm-60b852092c98dbdc6248d60109d90ae6f8ad841c.tar.bz2
[LoopDeletion] Forget loop before setting values to undef
After D71539, we need to forget the loop before setting the incoming values of phi nodes in exit blocks, because we are looking through those phi nodes now and the SCEV expression could depend on the loop phi. If we update the phi nodes before forgetting the loop, we miss those users during invalidation. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D88167
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUtils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index d7cd9b1..f2496c4 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -724,6 +724,9 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE,
}
LI->destroy(L);
}
+
+ if (SE)
+ SE->verify();
}
/// Checks if \p L has single exit through latch block except possibly