diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-06-19 19:55:49 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-06-19 19:55:49 +0000 |
commit | f5b59624afffc62ade26a267dda77973ed12d7e6 (patch) | |
tree | c504e5cd8c41a4e04ea5d46d4f6ebe0c2169581d /test/CodeGenOpenCL | |
parent | 76cc1a176372a9776265522f6d3e65fb67a63aee (diff) |
Reapply "r363684: AMDGPU: Add GWS instruction builtins"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenOpenCL')
-rw-r--r-- | test/CodeGenOpenCL/builtins-amdgcn.cl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/builtins-amdgcn.cl b/test/CodeGenOpenCL/builtins-amdgcn.cl index bd7fe78fc9..27a91a18cc 100644 --- a/test/CodeGenOpenCL/builtins-amdgcn.cl +++ b/test/CodeGenOpenCL/builtins-amdgcn.cl @@ -548,6 +548,18 @@ kernel void test_ds_consume_lds(global int* out, local int* ptr) { *out = __builtin_amdgcn_ds_consume(ptr); } +// CHECK-LABEL: @test_gws_init( +// CHECK: call void @llvm.amdgcn.ds.gws.init(i32 %value, i32 %id) +kernel void test_gws_init(uint value, uint id) { + __builtin_amdgcn_ds_gws_init(value, id); +} + +// CHECK-LABEL: @test_gws_barrier( +// CHECK: call void @llvm.amdgcn.ds.gws.barrier(i32 %value, i32 %id) +kernel void test_gws_barrier(uint value, uint id) { + __builtin_amdgcn_ds_gws_barrier(value, id); +} + // CHECK-DAG: [[$WI_RANGE]] = !{i32 0, i32 1024} // CHECK-DAG: attributes #[[$NOUNWIND_READONLY:[0-9]+]] = { nounwind readonly } // CHECK-DAG: attributes #[[$READ_EXEC_ATTRS]] = { convergent } |