diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-10-15 16:03:32 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-10-15 16:03:32 +0000 |
| commit | dafdd7863e9eeed3a714329b8758451cbcfc33bf (patch) | |
| tree | bd228b94b095dfb1e985e4d25f1d0e202fb70f24 /llvm/lib/Transforms/Utils/LoopVersioning.cpp | |
| parent | 6befc758a38754c930daf51e1094f210afb70f25 (diff) | |
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/LoopVersioning.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp index 97f29527bb95..6309eed7963d 100644 --- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp +++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp @@ -137,8 +137,10 @@ void LoopVersioning::addPHINodes( // See if we have a single-operand PHI with the value defined by the // original loop. for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) { - if (PN->getIncomingValue(0) == Inst) + if (PN->getIncomingValue(0) == Inst) { + SE->forgetValue(PN); break; + } } // If not create it. if (!PN) { |
