[llvm] [AArch64][SME] Support Windows/stack probes in MachineSMEABIPass (PR #149063)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 09:01:22 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()) {
----------------
MacDue wrote:
I'm missing a test for agnostic ZA with stack problems then :sweat_smile:. The `!Attrs.hasAgnosticZAInterface()` above should be removed.
https://github.com/llvm/llvm-project/pull/149063
More information about the llvm-commits
mailing list