From 1652d44d8da83b0a01d5f0b378f10882f5ec8d22 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Tue, 23 Jan 2024 12:35:16 +0100 Subject: [Clang] Amend SME attributes with support for ZT0. (#77941) This patch builds on top of #76971 and implements support for: * __arm_new("zt0") * __arm_in("zt0") * __arm_out("zt0") * __arm_inout("zt0") * __arm_preserves("zt0") --- clang/lib/CodeGen/CodeGenModule.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 78b2f2ba29fd..1280bcd36de9 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2415,6 +2415,8 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if (auto *Attr = D->getAttr()) { if (Attr->isNewZA()) B.addAttribute("aarch64_pstate_za_new"); + if (Attr->isNewZT0()) + B.addAttribute("aarch64_new_zt0"); } // Track whether we need to add the optnone LLVM attribute, -- cgit v1.2.3