[llvm-branch-commits] [libc] [libc] Add optimized clang_vector memchr implementation (PR #244469)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 20 09:51:05 PST 2026


================
@@ -55,39 +55,168 @@ LIBC_INLINE static const void *calculate_find_first_character_return(
   return src + c_offset;
 }
 
-LIBC_NO_SANITIZE_OOB_ACCESS LIBC_INLINE static const void *
+LIBC_INLINE_VAR constexpr size_t VEC_SIZE = sizeof(cpp::simd<char>);
+LIBC_INLINE_VAR constexpr size_t LOOP_BLOCK_SIZE = 4 * VEC_SIZE;
+
+// A find_first_character implementation for inputs less than the loop block
+// size. It loads N vectors with the last end of the last vector alinging
----------------
lntue wrote:

nit: `aligned`

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


More information about the llvm-branch-commits mailing list