[clang] [Clang][AArch64] Add diagnostics for builtins that use ZT0. (PR #79140)

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 23 06:30:32 PST 2024


================
@@ -108,3 +108,11 @@ svint8_t new_za(svint8_t zd, svbool_t pg, uint32_t slice_base) __arm_streaming {
     // expected-no-warning
     return svread_hor_za8_s8_m(zd, pg, 0, slice_base);
 }
+
+void missing_zt0(void) __arm_streaming {
+  // expected-warning at +1 {{builtin call is not valid when calling from a function without active ZT0 state}}
+  svzero_zt(0);
+}
+
+__arm_new("zt0")
+void new_zt0(void) __arm_streaming { svzero_zt(0); } // no warning
----------------
kmclaughlin-arm wrote:

Can this be changed to:
`// expected-no-warning`
to match similar tests above?

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


More information about the cfe-commits mailing list