-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts #115099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e5f485a
80e6138
2c07705
452f72b
371d448
57f92b7
445ad48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2197,10 +2197,7 @@ _mm_storer_ps(float *__p, __m128 __a) | |
#define _MM_HINT_T2 1 | ||
#define _MM_HINT_NTA 0 | ||
|
||
#ifndef _MSC_VER | ||
/* FIXME: We have to #define this because "sel" must be a constant integer, and | ||
Sema doesn't do any form of constant propagation yet. */ | ||
|
||
#if 0 | ||
/// Loads one cache line of data from the specified address to a location | ||
/// closer to the processor. | ||
/// | ||
|
@@ -2225,6 +2222,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. | ||
/// | ||
/// _mm_prefetch is implemented as a "library builtin" directly in Clang, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this interact with doxygen (https://clang.llvm.org/doxygen/xmmintrin_8h.html#a938d3f37a8561a80cecbac4f7b55898f)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not well. I can put this inside an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use |
||
/// similar to how it is done in MSVC. Clang will warn if the user doesn't | ||
/// include xmmintrin.h or immintrin.h. | ||
#define _mm_prefetch(a, sel) (__builtin_prefetch((const void *)(a), \ | ||
((sel) >> 2) & 1, (sel) & 0x3)) | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only
_m_prefetchw
requires "prfchw"._m_prefetch
can be put together with_mm_prefetch
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL at the new patch: #138360
At least based on the header structure before this, they were both in prftchwintrin.h , so I haven't made this change.