aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-09-23 09:45:46 +0200
committerNikita Popov <npopov@redhat.com>2024-09-23 09:54:28 +0200
commitc8e0672864abf6fb624ddde5d6a1775d8634213a (patch)
tree1082b45319600fc1e2b4c60d139d562d0ad125d6 /llvm/lib/Transforms/Utils/LoopVersioning.cpp
parent6ad268e3913cb6814fabae420a8e80156e1632a7 (diff)
downloadllvm-c8e0672864abf6fb624ddde5d6a1775d8634213a.zip
llvm-c8e0672864abf6fb624ddde5d6a1775d8634213a.tar.gz
llvm-c8e0672864abf6fb624ddde5d6a1775d8634213a.tar.bz2
[Loops] Use forgetLcssaPhiWithNewPredecessor() in more places
Use the more aggressive invalidation method in a number of places that add incoming values to lcssa phi nodes. It is likely that it's possible to construct cases with incorrect SCEV preservation similar to https://github.com/llvm/llvm-project/issues/109333 for these.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopVersioning.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
index af2ed62..8f8c40a 100644
--- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp
+++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
@@ -137,7 +137,7 @@ void LoopVersioning::addPHINodes(
// original loop.
for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) {
if (PN->getIncomingValue(0) == Inst) {
- SE->forgetValue(PN);
+ SE->forgetLcssaPhiWithNewPredecessor(VersionedLoop, PN);
break;
}
}