[llvm] [AArch64][SME] Rework VG CFI information for streaming-mode changes (PR #152283)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 08:26:43 PDT 2025
================
@@ -545,6 +548,16 @@ bool AArch64FrameLowering::hasFPImpl(const MachineFunction &MF) const {
MFI.hasStackMap() || MFI.hasPatchPoint() ||
RegInfo->hasStackRealignment(MF))
return true;
+ // If we have streaming mode changes and SVE registers on the stack we need a
+ // FP. This is as the stack size may depend on the VG at entry to the
+ // function, which is saved before the SVE area (so unrecoverable without a
+ // FP). Similar for locally streaming functions, but it is because we use
+ // ADDSVL to setup the SVE stack (which might not match VG, even without
+ // streaming-mode changes).
+ if (AFI.needsDwarfUnwindInfo(MF) &&
+ ((requiresSaveVG(MF) || AFI.getSMEFnAttrs().hasStreamingBody()) &&
----------------
MacDue wrote:
Split off a patch for this: #152323
https://github.com/llvm/llvm-project/pull/152283
More information about the llvm-commits
mailing list