[llvm-branch-commits] [llvm] RuntimeLibcalls: Add SME attributes to the AArch64 SME support routines (PR #245123)

Benjamin Maxwell via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 23 02:30:16 PST 2026


================
@@ -1084,40 +1084,50 @@ multiclass LibmLibcallImpls<string libcall_basename = !toupper(NAME),
 }
 
 // AArch64 calls
+defvar SMCompatible = StringFnAttr<"aarch64_pstate_sm_compatible">;
+defvar InZA = StringFnAttr<"aarch64_in_za">;
----------------
MacDue wrote:

`SMCompatible` is correct. Putting `InZA` on all functions is not. The standard defines most as `private-ZA` or `agnostic-ZA` + that they preserve ZA. They can't really be described with the general attributes yet (as the backend is rather conservative with normal functions). Currently, ABI routines are simply special cased in the C++ handling. If you want to handle that'd, for now I think we'd simply need to add an `aarch64_sme_abi_rt` attribute to mark these functions. 

https://github.com/llvm/llvm-project/pull/245123


More information about the llvm-branch-commits mailing list