summaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2017-09-13 18:50:42 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2017-09-13 18:50:42 +0000
commit98cefd8dc1e3f7d7d55a99d9b9ec60a564a5df13 (patch)
treebbc4ba915efeeb3a1dd2df55ce8b98bbe79bbf50 /test/CodeGenOpenCL
parentdbca73854b7d4eb4b35c510f74442f985b67481a (diff)
[AMDGPU] Change addr space of clk_event_t, queue_t and reserve_id_t to global
Differential Revision: https://reviews.llvm.org/D37703 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenOpenCL')
-rw-r--r--test/CodeGenOpenCL/opencl_types.cl19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/CodeGenOpenCL/opencl_types.cl b/test/CodeGenOpenCL/opencl_types.cl
index 372effc7f7..3501f9fd34 100644
--- a/test/CodeGenOpenCL/opencl_types.cl
+++ b/test/CodeGenOpenCL/opencl_types.cl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -cl-std=CL2.0 %s -triple "spir-unknown-unknown" -emit-llvm -o - -O0 | FileCheck %s --check-prefix=CHECK-SPIR
-// RUN: %clang_cc1 -cl-std=CL2.0 %s -triple "amdgcn--amdhsa" -emit-llvm -o - -O0 | FileCheck %s --check-prefix=CHECK-AMDGCN
+// RUN: %clang_cc1 -cl-std=CL2.0 %s -triple "spir-unknown-unknown" -emit-llvm -o - -O0 | FileCheck %s --check-prefixes=CHECK-COM,CHECK-SPIR
+// RUN: %clang_cc1 -cl-std=CL2.0 %s -triple "amdgcn--amdhsa" -emit-llvm -o - -O0 | FileCheck %s --check-prefixes=CHECK-COM,CHECK-AMDGCN
#define CLK_ADDRESS_CLAMP_TO_EDGE 2
#define CLK_NORMALIZED_COORDS_TRUE 1
@@ -7,7 +7,7 @@
#define CLK_FILTER_LINEAR 0x20
constant sampler_t glb_smp = CLK_ADDRESS_CLAMP_TO_EDGE|CLK_NORMALIZED_COORDS_TRUE|CLK_FILTER_NEAREST;
-// CHECK-SPIR-NOT: constant i32
+// CHECK-COM-NOT: constant i32
void fnc1(image1d_t img) {}
// CHECK-SPIR: @fnc1(%opencl.image1d_ro_t addrspace(1)*
@@ -39,20 +39,23 @@ void fnc4smp(sampler_t s) {}
kernel void foo(image1d_t img) {
sampler_t smp = CLK_ADDRESS_CLAMP_TO_EDGE|CLK_NORMALIZED_COORDS_TRUE|CLK_FILTER_LINEAR;
- // CHECK-SPIR: alloca %opencl.sampler_t addrspace(2)*
+ // CHECK-COM: alloca %opencl.sampler_t addrspace(2)*
event_t evt;
- // CHECK-SPIR: alloca %opencl.event_t*
+ // CHECK-COM: alloca %opencl.event_t*
clk_event_t clk_evt;
// CHECK-SPIR: alloca %opencl.clk_event_t*
+ // CHECK-AMDGCN: alloca %opencl.clk_event_t addrspace(1)*
queue_t queue;
// CHECK-SPIR: alloca %opencl.queue_t*
+ // CHECK-AMDGCN: alloca %opencl.queue_t addrspace(1)*
reserve_id_t rid;
// CHECK-SPIR: alloca %opencl.reserve_id_t*
- // CHECK-SPIR: store %opencl.sampler_t addrspace(2)*
+ // CHECK-AMDGCN: alloca %opencl.reserve_id_t addrspace(1)*
+ // CHECK-COM: store %opencl.sampler_t addrspace(2)*
fnc4smp(smp);
- // CHECK-SPIR: call {{.*}}void @fnc4smp(%opencl.sampler_t addrspace(2)*
+ // CHECK-COM: call {{.*}}void @fnc4smp(%opencl.sampler_t addrspace(2)*
fnc4smp(glb_smp);
- // CHECK-SPIR: call {{.*}}void @fnc4smp(%opencl.sampler_t addrspace(2)*
+ // CHECK-COM: call {{.*}}void @fnc4smp(%opencl.sampler_t addrspace(2)*
}
kernel void foo_pipe(read_only pipe int p) {}