[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 4 09:43:56 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list