forked from OSchip/llvm-project
LiveVariables: Do not remove dead flags from vreg operands
Also add a FIXME comment on why Mips RDDSP causes bogus dead flags to be added which LiveVariables cleans up by accident. llvm-svn: 264695
This commit is contained in:
parent
3c8edde141
commit
82cff88691
|
@ -527,9 +527,14 @@ void LiveVariables::runOnInstr(MachineInstr *MI,
|
||||||
MO.setIsKill(false);
|
MO.setIsKill(false);
|
||||||
if (MO.readsReg())
|
if (MO.readsReg())
|
||||||
UseRegs.push_back(MOReg);
|
UseRegs.push_back(MOReg);
|
||||||
} else /*MO.isDef()*/ {
|
} else {
|
||||||
if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
|
assert(MO.isDef());
|
||||||
MRI->isReserved(MOReg)))
|
// FIXME: We should not remove any dead flags. Howeve the MIPS RDDSP
|
||||||
|
// instruction needs it at the moment: RDDSP gets its implicit use
|
||||||
|
// operands added too late in the processing so InstrEmitter adds an
|
||||||
|
// incorrect dead flag because the uses are not yet visible.
|
||||||
|
if (TargetRegisterInfo::isPhysicalRegister(MOReg) &&
|
||||||
|
!MRI->isReserved(MOReg))
|
||||||
MO.setIsDead(false);
|
MO.setIsDead(false);
|
||||||
DefRegs.push_back(MOReg);
|
DefRegs.push_back(MOReg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue