================ @@ -11145,7 +11148,22 @@ bool Sema::areMultiversionVariantFunctionsCompatible( FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo(); FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo(); - if (OldTypeInfo.getCC() != NewTypeInfo.getCC()) + const auto *OldFPT = OldFD->getType()->getAs<FunctionProtoType>(); + const auto *NewFPT = NewFD->getType()->getAs<FunctionProtoType>(); + + bool ArmStreamingCCMismatched = false; + if (OldFPT && NewFPT) { + unsigned Diff = + OldFPT->getAArch64SMEAttributes() ^ NewFPT->getAArch64SMEAttributes(); + // Streaming versions cannot be mixed with non-streaming versions. + if (Diff & FunctionType::SME_PStateSMEnabledMask) + ArmStreamingCCMismatched = true; + // Streaming-compatible versions cannot be mixed with anything else. + if (Diff & FunctionType::SME_PStateSMCompatibleMask) + ArmStreamingCCMismatched = true; ---------------- sdesmalen-arm wrote:
nit: ```suggestion if (Diff & (FunctionType::SME_PStateSMEnabledMask | FunctionType::SME_PStateSMCompatibleMask)) ArmStreamingCCMismatched = true; ``` https://github.com/llvm/llvm-project/pull/100181 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits