================ @@ -3175,11 +3175,16 @@ static void checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, } static bool hasSMEZAState(const FunctionDecl *FD) { - if (FD->hasAttr<ArmNewZAAttr>()) - return true; - if (const auto *T = FD->getType()->getAs<FunctionProtoType>()) - if (T->getAArch64SMEAttributes() & FunctionType::SME_PStateZASharedMask) + if (auto *Attr = FD->getAttr<ArmNewAttr>()) + if (Attr->isNewZA()) + return true; + if (const auto *T = FD->getType()->getAs<FunctionProtoType>()) { + FunctionType::ArmStateValue State = + FunctionType::getArmZAState(T->getAArch64SMEAttributes()); + if (State == FunctionType::ARM_In || State == FunctionType::ARM_Out || ---------------- rsandifo-arm wrote:
Shouldn't this include `ARM_Preserves` too? `__arm_preserves("za")` functions are shared-ZA functions. https://github.com/llvm/llvm-project/pull/76971 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits