aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-06-04 00:38:56 +0000
committerOwen Anderson <resistor@mac.com>2008-06-04 00:38:56 +0000
commit3094a4c97af4e81ff3bf9eea1997b86886dffcf2 (patch)
tree14cd7014904a921822707d70dd5325f484458131 /lib
parentba12f57ebea3a5b3d0711d194e4584937309bc8b (diff)
downloadexternal_llvm-3094a4c97af4e81ff3bf9eea1997b86886dffcf2.zip
external_llvm-3094a4c97af4e81ff3bf9eea1997b86886dffcf2.tar.gz
external_llvm-3094a4c97af4e81ff3bf9eea1997b86886dffcf2.tar.bz2
We need to subtract one from this index because live ranges are open at the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-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?");