summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-02-08 05:45:46 +0000
committerCraig Topper <craig.topper@gmail.com>2017-02-08 05:45:46 +0000
commit3fd463a15a9b0dc1075029e041284f8dc460395c (patch)
tree95575a04e9b6de43235838d1be3c26a0acf7e69f /llvm/test
parent6c05192018e18bfe6e3cc54f0a74b5710b5a5f61 (diff)
downloadbcm5719-llvm-3fd463a15a9b0dc1075029e041284f8dc460395c.tar.gz
bcm5719-llvm-3fd463a15a9b0dc1075029e041284f8dc460395c.zip
[X86] Add test for clflushopt intrinsic and only enable it to be selected if the feature flag is set.
llvm-svn: 294407
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/clflushopt.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/clflushopt.ll b/llvm/test/CodeGen/X86/clflushopt.ll
new file mode 100644
index 00000000000..ee416eb96c5
--- /dev/null
+++ b/llvm/test/CodeGen/X86/clflushopt.ll
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=clflushopt | FileCheck %s
+
+define void @clflushopt(i8* %p) nounwind {
+; CHECK-LABEL: clflushopt:
+; CHECK: ## BB#0:
+; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
+; CHECK-NEXT: clflushopt (%eax)
+; CHECK-NEXT: retl
+ tail call void @llvm.x86.clflushopt(i8* %p)
+ ret void
+}
+declare void @llvm.x86.clflushopt(i8*) nounwind
OpenPOWER on IntegriCloud