diff options
| author | Dan Gohman <gohman@apple.com> | 2008-09-18 18:22:32 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-09-18 18:22:32 +0000 |
| commit | f3d647e00bd25ad39005c49e66e5f9714dafb7fa (patch) | |
| tree | f432df9561d844ec30a53588129f64b002011a41 /llvm/lib/CodeGen | |
| parent | 3405a73ab8e551234ba803394d70e55dd57cf00a (diff) | |
| download | bcm5719-llvm-f3d647e00bd25ad39005c49e66e5f9714dafb7fa.tar.gz bcm5719-llvm-f3d647e00bd25ad39005c49e66e5f9714dafb7fa.zip | |
Don't consider instructions with implicit physical register
defs to be necessarily live.
llvm-svn: 56310
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index a3bba61e4a2..8b9cf05d675 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -64,7 +64,8 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) { const MachineOperand &MO = MI->getOperand(i); if (MO.isRegister() && MO.isDef()) { unsigned Reg = MO.getReg(); - if (TargetRegisterInfo::isPhysicalRegister(Reg) || + if ((!MO.isImplicit() && + TargetRegisterInfo::isPhysicalRegister(Reg)) || !MRI.use_empty(Reg)) { // This def has a use. Don't delete the instruction! AllDefsDead = false; |

