[libc-commits] [libc] [libc] Fix AVX2 compare_and_mask broadcasting byte needle with epi16 (PR #235246)

via libc-commits libc-commits at lists.llvm.org
Sat Oct 24 00:16:12 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libc/src/string/memory_utils/x86_64/inline_strlen.h libc/test/src/string/memchr_test.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/test/src/string/memchr_test.cpp b/libc/test/src/string/memchr_test.cpp
index 9a3f21e47..d7ef35427 100644
--- a/libc/test/src/string/memchr_test.cpp
+++ b/libc/test/src/string/memchr_test.cpp
@@ -149,7 +149,8 @@ TEST(LlvmLibcMemChrTest, NoFalseMatchWithZeroOrNegativeByteAtOddOffset) {
   for (size_t i = 0; i < sizeof(buf); ++i)
     buf[i] = 0x11;
 
-  // Odd offset has 0x00 and 0xFF; searching for 'A' (0x41) must not false-match.
+  // Odd offset has 0x00 and 0xFF; searching for 'A' (0x41) must not
+  // false-match.
   buf[1] = 0x00;
   buf[3] = 0xFF;
   ASSERT_STREQ(call_memchr(buf, 'A', sizeof(buf)), nullptr);

``````````

</details>


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


More information about the libc-commits mailing list