@@ -1530,24 +1530,24 @@ void AArch64EpilogueEmitter::emitEpilogue() {
15301530 (AFI->isStackRealigned () || MFI.hasVarSizedObjects ()) ? AArch64::FP
15311531 : AArch64::SP;
15321532 if (SVECalleeSavesSize && BaseForSVEDealloc == AArch64::FP) {
1533- // The offset from the frame-pointer to the start of the ZPR/PPR CSRs .
1534- StackOffset FPOffsetZPRCSRs =
1533+ // The offset from the frame-pointer to the start of the ZPR saves .
1534+ StackOffset FPOffsetZPR =
15351535 -SVECalleeSavesSize -
15361536 StackOffset::getFixed (AFI->getCalleeSaveBaseToFrameRecordOffset ());
1537- StackOffset FPOffsetPPRCSRs = FPOffsetZPRCSRs + ZPR.CalleeSavesSize ;
15381537
15391538 // With split SVE, the PPR locals are above the ZPR callee-saves.
15401539 if (ZPR.CalleeSavesSize && SVELayout == SVEStackLayout::Split)
1541- FPOffsetZPRCSRs -= PPR.LocalsSize ;
1540+ FPOffsetZPR -= PPR.LocalsSize ;
15421541
1543- // The code below will deallocate the stack space space by moving the SP
1544- // to the start of the ZPR/PPR callee-save area.
1545- moveSPBelowFP (ZPRRange.Begin , FPOffsetZPRCSRs );
1542+ // Deallocate the stack space space by moving the SP to the start of the
1543+ // ZPR/PPR callee-save area.
1544+ moveSPBelowFP (ZPRRange.Begin , FPOffsetZPR );
15461545
15471546 if (PPR.CalleeSavesSize && SVELayout == SVEStackLayout::Split) {
15481547 // Move to the start of the PPR area (this offset may be zero).
1548+ StackOffset FPOffsetPPR = -PPR.CalleeSavesSize ;
15491549 emitFrameOffset (MBB, ZPRRange.End , DL, AArch64::SP, AArch64::SP,
1550- FPOffsetPPRCSRs - FPOffsetZPRCSRs , TII,
1550+ FPOffsetPPR - FPOffsetZPR , TII,
15511551 MachineInstr::FrameDestroy);
15521552 }
15531553 } else if (BaseForSVEDealloc == AArch64::SP) {
0 commit comments