@@ -9055,9 +9055,6 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
90559055 if (MF.getTarget().Options.EmitCallGraphSection && CB && CB->isIndirectCall())
90569056 CSInfo = MachineFunction::CallSiteInfo(*CB);
90579057
9058- // Determine whether we need any streaming mode changes.
9059- SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), *this, CLI);
9060-
90619058 // Check callee args/returns for SVE registers and set calling convention
90629059 // accordingly.
90639060 if (CallConv == CallingConv::C || CallConv == CallingConv::Fast) {
@@ -9071,6 +9068,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
90719068 CallConv = CallingConv::AArch64_SVE_VectorCall;
90729069 }
90739070
9071+ // Determine whether we need any streaming mode changes.
9072+ SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), *this, CLI);
90749073 bool UseNewSMEABILowering = Subtarget->useNewSMEABILowering();
90759074 bool IsAgnosticZAFunction = CallAttrs.caller().hasAgnosticZAInterface();
90769075 auto ZAMarkerNode = [&]() -> std::optional<unsigned> {
@@ -9089,7 +9088,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
90899088
90909089 // A sibling call is one where we're under the usual C ABI and not planning
90919090 // to change that but can still do a tail call:
9092- if (!ZAMarkerNode.has_value() && !TailCallOpt && IsTailCall &&
9091+ if (!ZAMarkerNode && !TailCallOpt && IsTailCall &&
90939092 CallConv != CallingConv::Tail && CallConv != CallingConv::SwiftTail)
90949093 IsSibCall = true;
90959094
@@ -9238,8 +9237,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
92389237 Chain = DAG.getCALLSEQ_START(Chain, IsTailCall ? 0 : NumBytes, 0, DL);
92399238 if (ZAMarkerNode) {
92409239 // Note: We need the CALLSEQ_START to glue the ZAMarkerNode to, simply
9241- // using a chain can result in incorrect scheduling. The markers referer
9242- // to the position just before the CALLSEQ_START (though occur after as
9240+ // using a chain can result in incorrect scheduling. The markers refer to
9241+ // the position just before the CALLSEQ_START (though occur after as
92439242 // CALLSEQ_START lacks in-glue).
92449243 Chain = DAG.getNode(*ZAMarkerNode, DL, DAG.getVTList(MVT::Other),
92459244 {Chain, Chain.getValue(1)});
0 commit comments