[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 5 08:54:20 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 ||
----------------
sdesmalen-arm wrote:
Addressed by https://github.com/llvm/llvm-project/pull/76971/commits/e49a2dd0ef817eed3b6246a553efd7423b861130
https://github.com/llvm/llvm-project/pull/76971
More information about the cfe-commits
mailing list