diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 79f4357..cd3b6c1 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -73,7 +73,8 @@ static void ConnectProlog(Loop *L, Value *BECount, unsigned Count, BasicBlock *OriginalLoopLatchExit, BasicBlock *PreHeader, BasicBlock *NewPreHeader, ValueToValueMapTy &VMap, DominatorTree *DT, - LoopInfo *LI, bool PreserveLCSSA) { + LoopInfo *LI, bool PreserveLCSSA, + ScalarEvolution &SE) { // Loop structure should be the following: // Preheader // PrologHeader @@ -133,6 +134,7 @@ static void ConnectProlog(Loop *L, Value *BECount, unsigned Count, PN.setIncomingValueForBlock(NewPreHeader, NewPN); else PN.addIncoming(NewPN, PrologExit); + SE.forgetValue(&PN); } } @@ -927,7 +929,7 @@ bool llvm::UnrollRuntimeLoopRemainder( // Connect the prolog code to the original loop and update the // PHI functions. ConnectProlog(L, BECount, Count, PrologExit, LatchExit, PreHeader, - NewPreHeader, VMap, DT, LI, PreserveLCSSA); + NewPreHeader, VMap, DT, LI, PreserveLCSSA, *SE); } // If this loop is nested, then the loop unroller changes the code in the any |