[PATCH] D75896: [X86] Support intrinsic _mm_cldemote
Kan Shengchen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 11 19:04:05 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGab69cd0779c5: [X86] Support intrinsic _mm_cldemote (authored by skan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75896/new/
https://reviews.llvm.org/D75896
Files:
clang/lib/Headers/cldemoteintrin.h
clang/test/CodeGen/cldemote.c
Index: clang/test/CodeGen/cldemote.c
===================================================================
--- clang/test/CodeGen/cldemote.c
+++ clang/test/CodeGen/cldemote.c
@@ -7,4 +7,6 @@
//CHECK-LABEL: @test_cldemote
//CHECK: call void @llvm.x86.cldemote(i8* %{{.*}})
_cldemote(p);
+ //CHECK: call void @llvm.x86.cldemote(i8* %{{.*}})
+ _mm_cldemote(p);
}
Index: clang/lib/Headers/cldemoteintrin.h
===================================================================
--- clang/lib/Headers/cldemoteintrin.h
+++ clang/lib/Headers/cldemoteintrin.h
@@ -18,11 +18,19 @@
#define __DEFAULT_FN_ATTRS \
__attribute__((__always_inline__, __nodebug__, __target__("cldemote")))
+/// Hint to hardware that the cache line that contains \p __P should be demoted
+/// from the cache closest to the processor core to a level more distant from
+/// the processor core.
+///
+/// \headerfile <x86intrin.h>
+///
+/// This intrinsic corresponds to the <c> CLDEMOTE </c> instruction.
static __inline__ void __DEFAULT_FN_ATTRS
_cldemote(const void * __P) {
__builtin_ia32_cldemote(__P);
}
+#define _mm_cldemote(p) _cldemote(p)
#undef __DEFAULT_FN_ATTRS
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75896.249814.patch
Type: text/x-patch
Size: 1169 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200312/94c98be9/attachment.bin>
More information about the cfe-commits
mailing list