@@ -8642,13 +8642,13 @@ static void analyzeCallOperands(const AArch64TargetLowering &TLI,
86428642}
86438643
86448644static SMECallAttrs
8645- getSMECallAttrs(const Function &Function ,
8645+ getSMECallAttrs(const Function &Caller ,
86468646 const TargetLowering::CallLoweringInfo &CLI) {
86478647 if (CLI.CB)
86488648 return SMECallAttrs(*CLI.CB);
86498649 if (auto *ES = dyn_cast<ExternalSymbolSDNode>(CLI.Callee))
8650- return SMECallAttrs(SMEAttrs(Function ), SMEAttrs(ES->getSymbol()));
8651- return SMECallAttrs(SMEAttrs(Function ), SMEAttrs(SMEAttrs::Normal));
8650+ return SMECallAttrs(SMEAttrs(Caller ), SMEAttrs(ES->getSymbol()));
8651+ return SMECallAttrs(SMEAttrs(Caller ), SMEAttrs(SMEAttrs::Normal));
86528652}
86538653
86548654bool AArch64TargetLowering::isEligibleForTailCallOptimization(
@@ -8964,7 +8964,8 @@ static SDValue emitSMEStateSaveRestore(const AArch64TargetLowering &TLI,
89648964 return TLI.LowerCallTo(CLI).second;
89658965}
89668966
8967- static unsigned getSMCondition(const SMECallAttrs &CallAttrs) {
8967+ static AArch64SME::ToggleCondition
8968+ getSMToggleCondition(const SMECallAttrs &CallAttrs) {
89688969 if (!CallAttrs.caller().hasStreamingCompatibleInterface() ||
89698970 CallAttrs.caller().hasStreamingBody())
89708971 return AArch64SME::Always;
@@ -9473,9 +9474,9 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
94739474 InGlue = Chain.getValue(1);
94749475 }
94759476
9476- SDValue NewChain =
9477- changeStreamingMode( DAG, DL, CallAttrs.callee().hasStreamingInterface(),
9478- Chain, InGlue, getSMCondition (CallAttrs), PStateSM);
9477+ SDValue NewChain = changeStreamingMode(
9478+ DAG, DL, CallAttrs.callee().hasStreamingInterface(), Chain, InGlue ,
9479+ getSMToggleCondition (CallAttrs), PStateSM);
94799480 Chain = NewChain.getValue(0);
94809481 InGlue = NewChain.getValue(1);
94819482 }
@@ -9662,7 +9663,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
96629663 assert(PStateSM && "Expected a PStateSM to be set");
96639664 Result = changeStreamingMode(
96649665 DAG, DL, !CallAttrs.callee().hasStreamingInterface(), Result, InGlue,
9665- getSMCondition (CallAttrs), PStateSM);
9666+ getSMToggleCondition (CallAttrs), PStateSM);
96669667
96679668 if (!Subtarget->isTargetDarwin() || Subtarget->hasSVE()) {
96689669 InGlue = Result.getValue(1);
0 commit comments