[llvm] [AArch64] Initial compiler support for SVE unwind on Windows. (PR #138609)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 05:17:03 PDT 2025


================
@@ -2736,13 +2849,21 @@ StackOffset AArch64FrameLowering::resolveFrameOffsetReference(
       "In the presence of dynamic stack pointer realignment, "
       "non-argument/CSR objects cannot be accessed through the frame pointer");
 
+  bool FPAfterSVECalleeSaves =
+      isTargetWindows(MF) && AFI->getSVECalleeSavedStackSize();
+
   if (isSVE) {
+    assert(-ObjectOffset > (int64_t)AFI->getSVECalleeSavedStackSize() &&
+           "Math isn't correct for CSRs with FPAfterSVECalleeSaves");
----------------
MacDue wrote:

This assertion should be moved under the `FPAfterSVECalleeSaves` check below to prevent the crash on non-Windows targets. The maths may also need fixing for Windows (that might also hit this), but that's a separate thing. 

https://github.com/llvm/llvm-project/pull/138609


More information about the llvm-commits mailing list