[PowerPC] Set kill flag for scratch register when spilling the link register

This fixes PR 28526.

llvm-svn: 275603
This commit is contained in:
Nemanja Ivanovic 2016-07-15 19:56:32 +00:00
parent 6d30aa03a0
commit 62fba48e0f
1 changed files with 1 additions and 1 deletions

View File

@ -901,7 +901,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
if (MustSaveLR)
// FIXME: On PPC32 SVR4, we must not spill before claiming the stackframe.
BuildMI(MBB, MBBI, dl, StoreInst)
.addReg(ScratchReg)
.addReg(ScratchReg, getKillRegState(true))
.addImm(LROffset)
.addReg(SPReg);