summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorGabor Buella <gabor.buella@intel.com>2018-04-13 07:35:08 +0000
committerGabor Buella <gabor.buella@intel.com>2018-04-13 07:35:08 +0000
commit604be4424bdc2ad62a386ad656ea287e1adde05f (patch)
tree3cee2e03a33c8755623a1e1145d0245b1814dfc6 /llvm/test/CodeGen
parent8293161712e68ff966d5dbfb623c5e33d96331f0 (diff)
downloadbcm5719-llvm-604be4424bdc2ad62a386ad656ea287e1adde05f.tar.gz
bcm5719-llvm-604be4424bdc2ad62a386ad656ea287e1adde05f.zip
[X86] Introduce cldemote instruction
Hint to hardware to move the cache line containing the address to a more distant level of the cache without writing back to memory. Reviewers: craig.topper, zvi Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45256 llvm-svn: 329992
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/cldemote-intrinsic.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/cldemote-intrinsic.ll b/llvm/test/CodeGen/X86/cldemote-intrinsic.ll
new file mode 100644
index 00000000000..83167456ac9
--- /dev/null
+++ b/llvm/test/CodeGen/X86/cldemote-intrinsic.ll
@@ -0,0 +1,21 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-linux -mattr=+cldemote | FileCheck %s --check-prefix=X64
+; RUN: llc < %s -mtriple=i386-pc-linux -mattr=+cldemote | FileCheck %s --check-prefix=X32
+
+define void @test_cldemote(i8* %p) {
+; X64-LABEL: test_cldemote:
+; X64: # %bb.0: # %entry
+; X64-NEXT: cldemote (%rdi)
+; X64-NEXT: retq
+;
+; X32-LABEL: test_cldemote:
+; X32: # %bb.0: # %entry
+; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: cldemote (%eax)
+; X32-NEXT: retl
+entry:
+ tail call void @llvm.x86.cldemote(i8* %p)
+ ret void
+}
+
+declare void @llvm.x86.cldemote(i8*)
OpenPOWER on IntegriCloud