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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 12:09:26 PST 2024


================
@@ -18,16 +18,25 @@ void SMEAttrs::set(unsigned M, bool Enable) {
   else
     Bitmask &= ~M;
 
+  // Streaming Mode Attrs
   assert(!(hasStreamingInterface() && hasStreamingCompatibleInterface()) &&
          "SM_Enabled and SM_Compatible are mutually exclusive");
-  assert(!(hasNewZABody() && hasSharedZAInterface()) &&
+
+  // ZA Attrs
+  assert(!(hasNewZABody() && sharesZA()) &&
          "ZA_New and ZA_Shared are mutually exclusive");
   assert(!(hasNewZABody() && preservesZA()) &&
          "ZA_New and ZA_Preserved are mutually exclusive");
   assert(!(hasNewZABody() && (Bitmask & ZA_NoLazySave)) &&
          "ZA_New and ZA_NoLazySave are mutually exclusive");
-  assert(!(hasSharedZAInterface() && (Bitmask & ZA_NoLazySave)) &&
+  assert(!(sharesZA() && (Bitmask & ZA_NoLazySave)) &&
          "ZA_Shared and ZA_NoLazySave are mutually exclusive");
+
+  // ZT0 Attrs
+  assert((!sharesZT0() || (isNewZT0() ^ isInZT0() ^ isInOutZT0() ^ isOutZT0() ^
+                           isPreservesZT0())) &&
+         "ZT0_New, ZT0_In, ZT0_Out, ZT0_InOut and ZT0_Preserved are all "
+         "mutually exclusive");
----------------
sdesmalen-arm wrote:

```suggestion
         "Attributes 'aarch64_new_zt0', 'aarch64_in_zt0', 'aarch64_out_zt0', "
         "'aarch64_inout_zt0' and 'aarch64_preserves_zt0' are mutually exclusive");
```

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


More information about the llvm-commits mailing list