Skip to content

Commit

Permalink
[Xtensa] Fix issue with adding scavenging frame index
Browse files Browse the repository at this point in the history
  • Loading branch information
sstefan1 authored and gerekon committed May 3, 2024
1 parent c784bd3 commit d7da292
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ void XtensaFrameLowering::processFunctionBeforeFrameFinalized(
const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
unsigned Size = TRI.getSpillSize(RC);
Align Alignment = TRI.getSpillAlign(RC);
for (int i = 0; i < NeedRegs; i++)
// If NeedsRegs == 0, we still need a spill slot
for (int i = 0; i <= NeedRegs; i++)
RS->addScavengingFrameIndex(
MFI.CreateStackObject(Size, Alignment, false));
}
Expand Down

0 comments on commit d7da292

Please sign in to comment.