From c700450a3cfdd6d96a5ffb1f8fb36380e9866e07 Mon Sep 17 00:00:00 2001 From: Nemanja Ivanovic Date: Fri, 15 Jul 2016 19:56:32 +0000 Subject: [PATCH] [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 --- lib/Target/PowerPC/PPCFrameLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCFrameLowering.cpp b/lib/Target/PowerPC/PPCFrameLowering.cpp index 3ed89473858..c480430dd29 100644 --- a/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -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); -- 2.49.0