diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2009-08-07 07:14:14 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2009-08-07 07:14:14 +0000 |
| commit | b1aeeed03e2e8960d156c3ab164374f3f0ae60aa (patch) | |
| tree | d9f911ebaab7b244c619e2aac11b683098cda380 /llvm/lib/CodeGen | |
| parent | e26a285c8fa6da40454d55a475689aa106abe8ff (diff) | |
| download | bcm5719-llvm-b1aeeed03e2e8960d156c3ab164374f3f0ae60aa.tar.gz bcm5719-llvm-b1aeeed03e2e8960d156c3ab164374f3f0ae60aa.zip | |
Another coalescer bug. When a dead copy is eliminated, transfer the kill to a def of the exact register rather than a super-register.
llvm-svn: 78376
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index b57bbc2ca5e..5688d8d6cff 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -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; } } |

