summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/StrongPHIElimination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp
index 449ef38..ab95387 100644
--- a/lib/CodeGen/StrongPHIElimination.cpp
+++ b/lib/CodeGen/StrongPHIElimination.cpp
@@ -467,7 +467,7 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
} else {
// Otherwise, add it to the renaming set
LiveInterval& I = LI.getOrCreateInterval(SrcReg);
- unsigned idx = LI.getMBBEndIdx(P->getOperand(i).getMBB());
+ unsigned idx = LI.getMBBEndIdx(P->getOperand(i).getMBB()) - 1;
VNInfo* VN = I.getLiveRangeContaining(idx)->valno;
assert(VN && "No VNInfo for register?");