[libc-commits] [libc] [libc] Implement wide read strlen with LLVM vector type (PR #152605)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Aug 15 13:19:55 PDT 2025


================
@@ -48,4 +48,13 @@
 #define LIBC_PREFERED_TYPE(TYPE)
 #endif
 
+#if __has_attribute(ext_vector_type) && defined(__clang__) &&                  \
+    __clang_major__ >= 15 &&                                                   \
+    (defined(LIBC_TARGET_ARCH_IS_X86) || defined(LIBC_TARGET_ARCH_IS_ARM))
+#define LIBC_HAS_VECTOR_TYPE 1
+#define LIBC_VECTOR_TYPE(N) __attribute__((ext_vector_type(N)))
+#else
+#define LIBC_HAS_VECTOR_TYPE 0
+#endif
----------------
michaelrj-google wrote:

I think getting a little more specific would be nice especially given the confusion around SIMD vectors and CPP vectors.

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


More information about the libc-commits mailing list