Skip to content

Commit 452f72b

Browse files
committed
Remove _mm_prefetch macro definition and associated _MSC_VER ifndefs
1 parent 2c07705 commit 452f72b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clang/lib/Headers/xmmintrin.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,10 +2197,6 @@ _mm_storer_ps(float *__p, __m128 __a)
21972197
#define _MM_HINT_T2 1
21982198
#define _MM_HINT_NTA 0
21992199

2200-
#ifndef _MSC_VER
2201-
/* FIXME: We have to #define this because "sel" must be a constant integer, and
2202-
Sema doesn't do any form of constant propagation yet. */
2203-
22042200
/// Loads one cache line of data from the specified address to a location
22052201
/// closer to the processor.
22062202
///
@@ -2225,9 +2221,10 @@ _mm_storer_ps(float *__p, __m128 __a)
22252221
/// be generated. \n
22262222
/// _MM_HINT_T2: Move data using the T2 hint. The PREFETCHT2 instruction will
22272223
/// be generated.
2228-
#define _mm_prefetch(a, sel) (__builtin_prefetch((const void *)(a), \
2229-
((sel) >> 2) & 1, (sel) & 0x3))
2230-
#endif
2224+
///
2225+
/// _mm_prefetch is implemented as a "library builtin" directly in Clang,
2226+
/// similar to how it is done in MSVC. Clang will warn if the user doesn't
2227+
/// include xmmintrin.h or immintrin.h.
22312228

22322229
/// Stores a 64-bit integer in the specified aligned memory location. To
22332230
/// minimize caching, the data is flagged as non-temporal (unlikely to be

0 commit comments

Comments
 (0)