forked from OSchip/llvm-project
[PowerPC] Set kill flag for scratch register when spilling the link register
This fixes PR 28526. llvm-svn: 275603
This commit is contained in:
parent
6d30aa03a0
commit
62fba48e0f
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue