File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 18
18
#define __DEFAULT_FN_ATTRS \
19
19
__attribute__((__always_inline__, __nodebug__, __target__("cldemote")))
20
20
21
+ /// Hint to hardware that the cache line that contains \p __P should be demoted
22
+ /// from the cache closest to the processor core to a level more distant from
23
+ /// the processor core.
24
+ ///
25
+ /// \headerfile <x86intrin.h>
26
+ ///
27
+ /// This intrinsic corresponds to the <c> CLDEMOTE </c> instruction.
21
28
static __inline__ void __DEFAULT_FN_ATTRS
22
29
_cldemote (const void * __P ) {
23
30
__builtin_ia32_cldemote (__P );
24
31
}
25
32
33
+ #define _mm_cldemote (p ) _cldemote(p)
26
34
#undef __DEFAULT_FN_ATTRS
27
35
28
36
#endif
Original file line number Diff line number Diff line change @@ -7,4 +7,6 @@ void test_cldemote(const void *p) {
7
7
//CHECK-LABEL: @test_cldemote
8
8
//CHECK: call void @llvm.x86.cldemote(i8* %{{.*}})
9
9
_cldemote (p );
10
+ //CHECK: call void @llvm.x86.cldemote(i8* %{{.*}})
11
+ _mm_cldemote (p );
10
12
}
You can’t perform that action at this time.
0 commit comments