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

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 10:46:41 PDT 2025


================
@@ -2303,10 +2371,16 @@ void AArch64FrameLowering::emitEpilogue(MachineFunction &MF,
     assert(AfterCSRPopSize == 0);
     return;
   }
+
+  bool FPAfterSVECalleeSaves =
+      Subtarget.isTargetWindows() && AFI->getSVECalleeSavedStackSize();
+
   bool CombineSPBump = shouldCombineCSRLocalStackBumpInEpilogue(MBB, NumBytes);
   // Assume we can't combine the last pop with the sp restore.
   bool CombineAfterCSRBump = false;
-  if (!CombineSPBump && PrologueSaveSize != 0) {
+  if (FPAfterSVECalleeSaves) {
+    AfterCSRPopSize = FixedObject;
----------------
efriedma-quic wrote:

Adapted those tests for Windows.  Let me know if that covers what you're concerned about, or if we need something else.

Discovered a couple of issues with predicate registers in the process...

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


More information about the llvm-commits mailing list