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

via libc-commits libc-commits at lists.llvm.org
Thu Mar 19 09:05:53 PDT 2026


================
@@ -73,6 +73,11 @@ struct Memcpy {
 namespace LIBC_NAMESPACE_DECL {
 namespace generic {
 
+template <typename T> LIBC_INLINE void stream(Ptr dst, T value) {
+  __builtin_nontemporal_store(value, reinterpret_cast<T *>(dst));
----------------
lntue wrote:

Doesn't look like gcc support this builtin.  https://godbolt.org/z/sohME3Y5b
We might need to guard or add compatible implementation somehow.

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


More information about the libc-commits mailing list