[llvm] [AArch64][SME2] Add ZT0 attributes to SMEAttrs (PR #77607)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 06:25:44 PST 2024


================
@@ -28,6 +31,11 @@ void SMEAttrs::set(unsigned M, bool Enable) {
          "ZA_New and ZA_NoLazySave are mutually exclusive");
   assert(!(hasSharedZAInterface() && (Bitmask & ZA_NoLazySave)) &&
          "ZA_Shared and ZA_NoLazySave are mutually exclusive");
+
+  // ZT0 Attrs
+  assert((!sharesZT0() || (hasNewZT0Body() ^ isZT0In() ^ isZT0InOut() ^
+                           isZT0Out() ^ preservesZT0())) &&
+         "ZT0_New,In,Out,InOut,Preserved are mutually exclusive");
----------------
sdesmalen-arm wrote:

This is not really a diagnostic, but rather a message of an assert. Asserts aren't really user-facing, they are more a way to identify an issue, which has to be clear enough to understand what the issue is. From the message, we know that mutually exclusive attributes have been combined somehow, which is enough to start debugging and find the cause of it.

I agree with your comment about having spaces between the commas and having the full names.

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


More information about the llvm-commits mailing list