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

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Wed Mar 18 09:19:07 PDT 2026


================
@@ -36,6 +36,15 @@ LIBC_INLINE_VAR constexpr size_t K_THREE_CACHELINES = 3 * K_ONE_CACHELINE;
 LIBC_INLINE_VAR constexpr bool K_USE_SOFTWARE_PREFETCHING =
     LLVM_LIBC_IS_DEFINED(LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING);
 
+// Whether to use NTA stores and what threshold for switching to NTA
+#ifdef LIBC_COPT_MEMCPY_X86_USE_NTA_STORES
----------------
gchatelet wrote:

This would need to be added to [config.json](https://github.com/llvm/llvm-project/blob/main/libc/config/config.json) and piped through CMake and Bazel.

This can be done as a separate patch if we're not sure this option is here to stay.

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


More information about the libc-commits mailing list