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

Matt Arsenault via libc-commits libc-commits at lists.llvm.org
Sun Aug 10 20:48:20 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
----------------
arsenm wrote:

But you aren't using bool vectors? Also this would need to be much more specific and drop the target check 

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


More information about the libc-commits mailing list