[clang] [CIR] Add support for __SVCount (PR #245456)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 08:57:37 PST 2026


================
@@ -644,6 +644,25 @@ def CIR_VectorType : CIR_Type<"Vector", "vector", [
   let hasCustomAssemblyFormat = 1;
 }
 
+//===----------------------------------------------------------------------===//
+// SveCountType
+//===----------------------------------------------------------------------===//
+
+def CIR_SveCountType : CIR_Type<"SveCount", "sve_count", [
+    DeclareTypeInterfaceMethods<DataLayoutTypeInterface>,
+    DeclareTypeInterfaceMethods<CIR_SizedTypeInterface>
+]> {
+  let summary = "AArch64 SVE predicate-as-counter type";
+  let description = [{
+    `!cir.sve_count` represents the AArch64 `__SVCount_t` (`svcount_t`) type.
+    Such a value contains information about the number of active lanes, the
+    element width and a bit that indicates whether the generated mask should be
+    inverted. It lowers to the LLVM type `target("aarch64.svcount")`.
+
+    The size of the type is a scalable 16 bits, and its alignment is 2 bytes.
----------------
erichkeane wrote:

Does this not change/get configured somewhere?  Will it some day? 

Not sure how much value this sentence adds though.

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


More information about the cfe-commits mailing list