mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 16:30:05 +00:00
Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
73b43b9b54
commit
b3db9c90d2
@ -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…
x
Reference in New Issue
Block a user