|
@@ -527,9 +527,14 @@ void LiveVariables::runOnInstr(MachineInstr *MI,
|
|
|
MO.setIsKill(false);
|
|
|
if (MO.readsReg())
|
|
|
UseRegs.push_back(MOReg);
|
|
|
- } else /*MO.isDef()*/ {
|
|
|
- if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
|
|
|
- MRI->isReserved(MOReg)))
|
|
|
+ } else {
|
|
|
+ assert(MO.isDef());
|
|
|
+ // 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);
|
|
|
DefRegs.push_back(MOReg);
|
|
|
}
|