[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 14:06:34 PST 2025


================
@@ -146,8 +146,13 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in
 // current formulation is based on what was easiest to recognize from the
 // pre-TableGen version.
 
-let Features = "mmx", Attributes = [NoThrow, Const] in {
-  def _mm_prefetch : X86NoPrefixBuiltin<"void(char const *, int)">;
+let Features = "mmx", Header = "immintrin.h", Attributes = [NoThrow, Const] in {
+  def _mm_prefetch : X86LibBuiltin<"void(char const *, int)">;
----------------
efriedma-quic wrote:

I guess not directly related to your patch, but... given we have a builtin for _mm_prefetch, should we kill off the macro in xmmintrin.h?

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


More information about the cfe-commits mailing list