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 committed Apr 19, 2024
1 parent b02b417 commit 829c5ad
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 829c5ad

Please sign in to comment.