[llvm] [AArch64][SME] Support Windows/stack probes in MachineSMEABIPass (PR #149063)
    Sander de Smalen via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Sep  4 08:54:09 PDT 2025
    
    
  
================
@@ -8291,7 +8291,39 @@ SDValue AArch64TargetLowering::LowerFormalArguments(
   if (Subtarget->hasCustomCallingConv())
     Subtarget->getRegisterInfo()->UpdateCustomCalleeSavedRegs(MF);
 
-  if (!getTM().useNewSMEABILowering() || Attrs.hasAgnosticZAInterface()) {
+  if (getTM().useNewSMEABILowering() && !Attrs.hasAgnosticZAInterface()) {
+    if (Subtarget->isTargetWindows() || hasInlineStackProbe(MF)) {
+      SDValue Size;
+      if (Attrs.hasZAState()) {
+        SDValue SVL = DAG.getNode(AArch64ISD::RDSVL, DL, MVT::i64,
+                                  DAG.getConstant(1, DL, MVT::i32));
+        Size = DAG.getNode(ISD::MUL, DL, MVT::i64, SVL, SVL);
+      } else if (Attrs.hasAgnosticZAInterface()) {
----------------
sdesmalen-arm wrote:
`Attrs.hasAgnosticZAInterface()` is always false, because the condition above `if (getTM().useNewSMEABILowering() && !Attrs.hasAgnosticZAInterface())`.
https://github.com/llvm/llvm-project/pull/149063
    
    
More information about the llvm-commits
mailing list