mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141812 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c66e7afcf2
commit
980df16920
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user