[libc-commits] [libc] [libc] Don't match the byte after the range in vector find_first_character (PR #235288)

Fabian Meumertzheim via libc-commits libc-commits at lists.llvm.org
Fri Nov 6 02:30:04 PST 2026


================
@@ -120,4 +120,37 @@ TEST_F(LlvmLibcWideAccessMemoryTest, FindFirstChar) {
   });
 }
 
+TEST_F(LlvmLibcWideAccessMemoryTest, FindFirstCharAfterRange) {
+  // All implementations, since the configured one is usually not vectorized.
+  static constexpr void *(*kImpls[])(const unsigned char *, unsigned char,
----------------
fmeum wrote:

```suggestion
  // Other architectures should be added to this list when they get a
  // target-specific find_first_character implementation.
  static constexpr void *(*kImpls[])(const unsigned char *, unsigned char,
```

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


More information about the libc-commits mailing list