aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/cldemote.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/cldemote.c')
-rw-r--r--test/CodeGen/cldemote.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/cldemote.c b/test/CodeGen/cldemote.c
new file mode 100644
index 000000000000..8c7bdf539333
--- /dev/null
+++ b/test/CodeGen/cldemote.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +cldemote -emit-llvm -o - -Wall -Werror | FileCheck %s
+// RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown -target-feature +cldemote -emit-llvm -o - -Wall -Werror | FileCheck %s
+
+#include <immintrin.h>
+
+void test_cldemote(const void *p) {
+ //CHECK-LABEL: @test_cldemote
+ //CHECK: call void @llvm.x86.cldemote(i8* %{{.*}})
+ _cldemote(p);
+}