[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 30 15:25:08 PST 2025


================
@@ -2225,9 +2221,10 @@ _mm_storer_ps(float *__p, __m128 __a)
 ///    be generated. \n
 ///    _MM_HINT_T2: Move data using the T2 hint. The PREFETCHT2 instruction will
 ///    be generated.
-#define _mm_prefetch(a, sel) (__builtin_prefetch((const void *)(a), \
-                                                 ((sel) >> 2) & 1, (sel) & 0x3))
-#endif
+///
+/// _mm_prefetch is implemented as a "library builtin" directly in Clang,
----------------
efriedma-quic wrote:

How does this interact with doxygen (https://clang.llvm.org/doxygen/xmmintrin_8h.html#a938d3f37a8561a80cecbac4f7b55898f)?

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


More information about the cfe-commits mailing list