summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-10-12 21:24:54 +0000
committerCameron Zwarich <zwarich@apple.com>2011-10-12 21:24:54 +0000
commit2dffcebf77e05d85e577fe8fbf47f93c198d5710 (patch)
tree344620cd4020a515c0be63da09ac306fdff90425 /llvm/lib
parent54a20ed0f132f2adc76d08298cccae33109b7659 (diff)
downloadbcm5719-llvm-2dffcebf77e05d85e577fe8fbf47f93c198d5710.tar.gz
bcm5719-llvm-2dffcebf77e05d85e577fe8fbf47f93c198d5710.zip
To find the exiting VN of a LiveInterval from a block, use the previous slot
rather than the previous index. If a block has a single instruction, the previous index may be in a different basic block. I have no clue how this used to work on all of test-suite, because now this failure is seen quite often when trying to compile code with -strong-phi-elim. This fixes PR10252. llvm-svn: 141812
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/StrongPHIElimination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp
index 0fabd8e6eef..76e6c9966a7 100644
--- a/llvm/lib/CodeGen/StrongPHIElimination.cpp
+++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp
@@ -674,7 +674,7 @@ void StrongPHIElimination::InsertCopiesForPHI(MachineInstr *PHI,
if (PHIColor && SrcColor == PHIColor) {
LiveInterval &SrcInterval = LI->getInterval(SrcReg);
SlotIndex PredIndex = LI->getMBBEndIdx(PredBB);
- VNInfo *SrcVNI = SrcInterval.getVNInfoAt(PredIndex.getPrevIndex());
+ VNInfo *SrcVNI = SrcInterval.getVNInfoAt(PredIndex.getPrevSlot());
assert(SrcVNI);
SrcVNI->setHasPHIKill(true);
continue;
OpenPOWER on IntegriCloud