[libc-commits] [libc] [libc][x86] Add Non-temporal code path for large memcpy (PR #187108)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 17 12:51:48 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 h -- libc/src/string/memory_utils/op_x86.h libc/src/string/memory_utils/x86_64/inline_memcpy.h --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/src/string/memory_utils/op_x86.h b/libc/src/string/memory_utils/op_x86.h
index a52f61650..d5e7a4273 100644
--- a/libc/src/string/memory_utils/op_x86.h
+++ b/libc/src/string/memory_utils/op_x86.h
@@ -79,8 +79,7 @@ template <typename T> LIBC_INLINE void stream(Ptr dst, T value) {
 }
 
 // If we are using regular stores, fence doesn't need to do anything
-template <typename T> LIBC_INLINE void fence() {
-}
+template <typename T> LIBC_INLINE void fence() {}
 
 ///////////////////////////////////////////////////////////////////////////////
 // Specializations for uint16_t
@@ -197,9 +196,7 @@ template <> struct cmp_is_expensive<__m256i> : cpp::true_type {};
 template <> LIBC_INLINE void stream<__m256i>(Ptr dst, __m256i value) {
   _mm256_stream_si256(reinterpret_cast<__m256i *>(dst), value);
 }
-template <> LIBC_INLINE void fence<__m256i>() {
-  _mm_sfence();
-}
+template <> LIBC_INLINE void fence<__m256i>() { _mm_sfence(); }
 template <> LIBC_INLINE bool eq<__m256i>(CPtr p1, CPtr p2, size_t offset) {
   const auto a = load<__m256i>(p1, offset);
   const auto b = load<__m256i>(p2, offset);

``````````

</details>


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


More information about the libc-commits mailing list