mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.
llvm-svn: 52649
This commit is contained in:
parent
24ec9f54bc
commit
f2386cff4f
@ -443,7 +443,7 @@ bool SimpleRegisterCoalescing::isBackEdgeCopy(MachineInstr *CopyMI,
|
||||
LI.FindLiveRangeContaining(li_->getDefIndex(DefIdx));
|
||||
if (DstLR == LI.end())
|
||||
return false;
|
||||
unsigned KillIdx = li_->getInstructionIndex(&MBB->back()) + InstrSlots::NUM;
|
||||
unsigned KillIdx = li_->getMBBEndIdx(MBB) + 1;
|
||||
if (DstLR->valno->kills.size() == 1 &&
|
||||
DstLR->valno->kills[0] == KillIdx && DstLR->valno->hasPHIKill)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user