summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp b/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
index 5ca09046199..6c922c2a698 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
@@ -644,7 +644,7 @@ bool llvm::peelLoop(Loop *L, unsigned PeelCount, LoopInfo *LI,
if (LatchInst && L->contains(LatchInst))
NewVal = LVMap[LatchInst];
- PHI->setIncomingValue(PHI->getBasicBlockIndex(NewPreHeader), NewVal);
+ PHI->setIncomingValueForBlock(NewPreHeader, NewVal);
}
// Adjust the branch weights on the loop exit.
OpenPOWER on IntegriCloud