Patch by Nick Johnson <Nicholas.Paul.Johnson@deshawresearch.com>
Differential Revision: http://reviews.llvm.org/D14875
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254012
91177308-0d34-0410-b5e6-
96231b3b80d8
continue;
unsigned MOReg = MO.getReg();
if (MO.isUse()) {
- MO.setIsKill(false);
+ if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
+ MRI->isReserved(MOReg)))
+ MO.setIsKill(false);
if (MO.readsReg())
UseRegs.push_back(MOReg);
} else /*MO.isDef()*/ {
- MO.setIsDead(false);
+ if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
+ MRI->isReserved(MOReg)))
+ MO.setIsDead(false);
DefRegs.push_back(MOReg);
}
}