[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 30 15:47:18 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,
----------------
rnk wrote:
Probably not well. I can put this inside an `#if 0` block or some other macro construct so that Doxygen sees it but it never interacts with user code, but I don't have a working doxygen install to confirm if it will work.
https://github.com/llvm/llvm-project/pull/115099
More information about the cfe-commits
mailing list