mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Another coalescer bug. When a dead copy is eliminated, transfer the kill to a def of the exact register rather than a super-register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -888,12 +888,13 @@ static void PropagateDeadness(LiveInterval &li, MachineInstr *CopyMI,
|
||||
MachineInstr *DefMI =
|
||||
li_->getInstructionFromIndex(li_->getDefIndex(LRStart));
|
||||
if (DefMI && DefMI != CopyMI) {
|
||||
int DeadIdx = DefMI->findRegisterDefOperandIdx(li.reg, false, tri_);
|
||||
if (DeadIdx != -1) {
|
||||
int DeadIdx = DefMI->findRegisterDefOperandIdx(li.reg, false);
|
||||
if (DeadIdx != -1)
|
||||
DefMI->getOperand(DeadIdx).setIsDead();
|
||||
// A dead def should have a single cycle interval.
|
||||
++LRStart;
|
||||
}
|
||||
else
|
||||
DefMI->addOperand(MachineOperand::CreateReg(li.reg,
|
||||
true, true, false, true));
|
||||
++LRStart;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user