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

This fixes PR 28526.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275603 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nemanja Ivanovic 2016-07-15 19:56:32 +00:00
parent 723a3ff949
commit c700450a3c

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);