mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Fix a subtle bug in DeadMachineInstructionElim's liveness
computation. A def of a register doesn't necessarily kill live super-registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -126,7 +126,10 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
unsigned Reg = MO.getReg();
|
unsigned Reg = MO.getReg();
|
||||||
if (Reg != 0 && TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
if (Reg != 0 && TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
||||||
LivePhysRegs.reset(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)
|
*AliasSet; ++AliasSet)
|
||||||
LivePhysRegs.reset(*AliasSet);
|
LivePhysRegs.reset(*AliasSet);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user