@@ -9050,9 +9050,6 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
90509050 if (MF.getTarget().Options.EmitCallGraphSection && CB && CB->isIndirectCall())
90519051 CSInfo = MachineFunction::CallSiteInfo(*CB);
90529052
9053- // Determine whether we need any streaming mode changes.
9054- SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), *this, CLI);
9055-
90569053 // Check callee args/returns for SVE registers and set calling convention
90579054 // accordingly.
90589055 if (CallConv == CallingConv::C || CallConv == CallingConv::Fast) {
@@ -9066,6 +9063,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
90669063 CallConv = CallingConv::AArch64_SVE_VectorCall;
90679064 }
90689065
9066+ // Determine whether we need any streaming mode changes.
9067+ SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), *this, CLI);
90699068 bool UseNewSMEABILowering = Subtarget->useNewSMEABILowering();
90709069 bool IsAgnosticZAFunction = CallAttrs.caller().hasAgnosticZAInterface();
90719070 auto ZAMarkerNode = [&]() -> std::optional<unsigned> {
@@ -9084,7 +9083,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
90849083
90859084 // A sibling call is one where we're under the usual C ABI and not planning
90869085 // to change that but can still do a tail call:
9087- if (!ZAMarkerNode.has_value() && !TailCallOpt && IsTailCall &&
9086+ if (!ZAMarkerNode && !TailCallOpt && IsTailCall &&
90889087 CallConv != CallingConv::Tail && CallConv != CallingConv::SwiftTail)
90899088 IsSibCall = true;
90909089
@@ -9233,8 +9232,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
92339232 Chain = DAG.getCALLSEQ_START(Chain, IsTailCall ? 0 : NumBytes, 0, DL);
92349233 if (ZAMarkerNode) {
92359234 // Note: We need the CALLSEQ_START to glue the ZAMarkerNode to, simply
9236- // using a chain can result in incorrect scheduling. The markers referer
9237- // to the position just before the CALLSEQ_START (though occur after as
9235+ // using a chain can result in incorrect scheduling. The markers refer to
9236+ // the position just before the CALLSEQ_START (though occur after as
92389237 // CALLSEQ_START lacks in-glue).
92399238 Chain = DAG.getNode(*ZAMarkerNode, DL, DAG.getVTList(MVT::Other),
92409239 {Chain, Chain.getValue(1)});
0 commit comments