@@ -9009,9 +9009,6 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
9009
9009
if (MF.getTarget().Options.EmitCallGraphSection && CB && CB->isIndirectCall())
9010
9010
CSInfo = MachineFunction::CallSiteInfo(*CB);
9011
9011
9012
- // Determine whether we need any streaming mode changes.
9013
- SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), CLI);
9014
-
9015
9012
// Check callee args/returns for SVE registers and set calling convention
9016
9013
// accordingly.
9017
9014
if (CallConv == CallingConv::C || CallConv == CallingConv::Fast) {
@@ -9025,6 +9022,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
9025
9022
CallConv = CallingConv::AArch64_SVE_VectorCall;
9026
9023
}
9027
9024
9025
+ // Determine whether we need any streaming mode changes.
9026
+ SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), CLI);
9028
9027
bool UseNewSMEABILowering = Subtarget->useNewSMEABILowering();
9029
9028
bool IsAgnosticZAFunction = CallAttrs.caller().hasAgnosticZAInterface();
9030
9029
auto ZAMarkerNode = [&]() -> std::optional<unsigned> {
@@ -9043,7 +9042,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
9043
9042
9044
9043
// A sibling call is one where we're under the usual C ABI and not planning
9045
9044
// to change that but can still do a tail call:
9046
- if (!ZAMarkerNode.has_value() && !TailCallOpt && IsTailCall &&
9045
+ if (!ZAMarkerNode && !TailCallOpt && IsTailCall &&
9047
9046
CallConv != CallingConv::Tail && CallConv != CallingConv::SwiftTail)
9048
9047
IsSibCall = true;
9049
9048
@@ -9199,8 +9198,8 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
9199
9198
Chain = DAG.getCALLSEQ_START(Chain, IsTailCall ? 0 : NumBytes, 0, DL);
9200
9199
if (ZAMarkerNode) {
9201
9200
// Note: We need the CALLSEQ_START to glue the ZAMarkerNode to, simply
9202
- // using a chain can result in incorrect scheduling. The markers referer
9203
- // to the position just before the CALLSEQ_START (though occur after as
9201
+ // using a chain can result in incorrect scheduling. The markers refer to
9202
+ // the position just before the CALLSEQ_START (though occur after as
9204
9203
// CALLSEQ_START lacks in-glue).
9205
9204
Chain = DAG.getNode(*ZAMarkerNode, DL, DAG.getVTList(MVT::Other),
9206
9205
{Chain, Chain.getValue(1)});
0 commit comments