forked from OSchip/llvm-project
We need to subtract one from this index because live ranges are open at the end.
llvm-svn: 51922
This commit is contained in:
parent
a2981a2c7b
commit
c777d9e6fe
|
|
@ -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?");
|
||||
|
|
|
|||
Loading…
Reference in New Issue