Fix off-by-one error when updating live intervals.
authorOwen Anderson <resistor@mac.com>
Wed, 24 Sep 2008 21:30:38 +0000 (21:30 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 24 Sep 2008 21:30:38 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56567 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/StrongPHIElimination.cpp

index 8bda41db3fa29a7d39988d0451e63a2a53f9c461..33bfa57b1cd5e4d44238c8941d80d1c06dedeb1d 100644 (file)
@@ -822,7 +822,7 @@ void StrongPHIElimination::InsertCopies(MachineDomTreeNode* MDTN,
                          LiveIntervals::getUseIndex(LI.getInstructionIndex(I)));
         
         LiveRange LR (LI.getMBBStartIdx(I->getParent()),
-                      LiveIntervals::getUseIndex(LI.getInstructionIndex(I)),
+                      LiveIntervals::getUseIndex(LI.getInstructionIndex(I))+1,
                       FirstVN);
         
         Int.addRange(LR);