Skip to content

Commit

Permalink
[PowerPC] Set kill flag for scratch register when spilling the link r…
Browse files Browse the repository at this point in the history
…egister

This fixes PR 28526.

llvm-svn: 275603
  • Loading branch information
nemanjai committed Jul 15, 2016
1 parent 6d30aa0 commit 62fba48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 62fba48

Please sign in to comment.