Skip to content

Commit 7fc63d9

Browse files
committed
Reword
1 parent 903f3fd commit 7fc63d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,22 +2543,22 @@ void AArch64FrameLowering::emitEpilogue(MachineFunction &MF,
25432543
if (AFI->isStackRealigned())
25442544
return AArch64::FP;
25452545
// With variable sized objects on the stack, we can use the BP or FP to
2546-
// restore the SVE callee saves. If there are no SVE locals the BP will
2547-
// be more efficient (a single ADD).
2546+
// restore the SVE callee saves.
25482547
if (MFI.hasVarSizedObjects()) {
25492548
if (DeallocateBefore && !AFI->hasStackHazardSlotIndex()) {
25502549
// If there's SVE locals and no hazard padding we can do:
25512550
// ADDVL SP, FP, #(-SVECalleeSavedSize)
25522551
return AArch64::FP;
25532552
}
2554-
// If there's SVE locals and hazard padding we can choose between:
2553+
// Otherwise, we can choose between:
25552554
// SUB TMP, FP, #(-CalleeSaveBaseOffset)
25562555
// ADDVL SP, TMP, #(-SVECalleeSavedSize)
25572556
// OR:
25582557
// ADD SP, BP, #NumBytes
25592558
// ADDVL SP, SP, #DeallocateBefore
2560-
// This chooses the latter as the "ADDVL" can be omitted if there's no
2561-
// SVE locals.
2559+
// Here we choose the latter as the "ADDVL" can be omitted if there's no
2560+
// SVE locals (and if we're here we either don't have SVE locals or have
2561+
// hazard padding).
25622562
assert(RegInfo->hasBasePointer(MF) && "Expected base pointer!");
25632563
return RegInfo->getBaseRegister();
25642564
}

0 commit comments

Comments
 (0)