summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2017-02-25 04:20:20 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2017-02-25 04:20:20 +0000
commitd26dbb389f1e693a8a7d085eb026c68718f68455 (patch)
tree053142017a197e2b3a3027bbf5804112365eedbc /clang/test
parentfad62c9554f58106a2ed06f39cba8d6f40919c12 (diff)
downloadbcm5719-llvm-d26dbb389f1e693a8a7d085eb026c68718f68455.tar.gz
bcm5719-llvm-d26dbb389f1e693a8a7d085eb026c68718f68455.zip
AMDGPU: export s_waitcnt builtin
Differential Revision: https://reviews.llvm.org/D30359 llvm-svn: 296239
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenOpenCL/builtins-amdgcn.cl7
-rw-r--r--clang/test/SemaOpenCL/builtins-amdgcn-error.cl5
2 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenOpenCL/builtins-amdgcn.cl b/clang/test/CodeGenOpenCL/builtins-amdgcn.cl
index 0f6eaef50b1..e9e765b521b 100644
--- a/clang/test/CodeGenOpenCL/builtins-amdgcn.cl
+++ b/clang/test/CodeGenOpenCL/builtins-amdgcn.cl
@@ -263,6 +263,13 @@ void test_class_f64(global double* out, double a, int b)
*out = __builtin_amdgcn_class(a, b);
}
+// CHECK-LABEL: @test_s_waitcnt
+// CHECK: call void @llvm.amdgcn.s.waitcnt(
+void test_s_waitcnt()
+{
+ __builtin_amdgcn_s_waitcnt(0);
+}
+
// CHECK-LABEL: @test_s_barrier
// CHECK: call void @llvm.amdgcn.s.barrier(
void test_s_barrier()
diff --git a/clang/test/SemaOpenCL/builtins-amdgcn-error.cl b/clang/test/SemaOpenCL/builtins-amdgcn-error.cl
index d8576e2bb53..5e45f7e76c2 100644
--- a/clang/test/SemaOpenCL/builtins-amdgcn-error.cl
+++ b/clang/test/SemaOpenCL/builtins-amdgcn-error.cl
@@ -18,6 +18,11 @@ void test_s_sleep(int x)
__builtin_amdgcn_s_sleep(x); // expected-error {{argument to '__builtin_amdgcn_s_sleep' must be a constant integer}}
}
+void test_s_waitcnt(int x)
+{
+ __builtin_amdgcn_s_waitcnt(x); // expected-error {{argument to '__builtin_amdgcn_s_waitcnt' must be a constant integer}}
+}
+
void test_s_incperflevel(int x)
{
__builtin_amdgcn_s_incperflevel(x); // expected-error {{argument to '__builtin_amdgcn_s_incperflevel' must be a constant integer}}
OpenPOWER on IntegriCloud