diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-16 00:11:23 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-16 00:11:23 +0000 |
commit | bf293c48dbb247b52fba23cdc89b295307132547 (patch) | |
tree | 783b9eed4209a2097af4ef3f8c26221a39defb99 /llvm/lib/CodeGen | |
parent | 5f68d4571b4ebf05a8ca474a2ca946613ad7efa7 (diff) | |
download | bcm5719-llvm-bf293c48dbb247b52fba23cdc89b295307132547.tar.gz bcm5719-llvm-bf293c48dbb247b52fba23cdc89b295307132547.zip |
Fix a subtle bug in DeadMachineInstructionElim's liveness
computation. A def of a register doesn't necessarily kill
live super-registers.
llvm-svn: 57614
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index 305ec0e7988..0d043f795a2 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -126,7 +126,10 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) { unsigned Reg = MO.getReg(); if (Reg != 0 && TargetRegisterInfo::isPhysicalRegister(Reg)) { LivePhysRegs.reset(Reg); - for (const unsigned *AliasSet = TRI->getAliasSet(Reg); + // Check the subreg set, not the alias set, because a def + // of a super-register may still be partially live after + // this def. + for (const unsigned *AliasSet = TRI->getSubRegisters(Reg); *AliasSet; ++AliasSet) LivePhysRegs.reset(*AliasSet); } |