diff options
| author | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 10:55:47 +0000 |
|---|---|---|
| committer | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 10:55:47 +0000 |
| commit | 610541989a524be452a5674cd3fb78304ce3fa8a (patch) | |
| tree | 531d41128c330184f827fe19a030d2f8387f35dd /clang/test/CodeGenOpenCL | |
| parent | 4ea6816247a211e731b7929ca08d682c781e3348 (diff) | |
| download | bcm5719-llvm-610541989a524be452a5674cd3fb78304ce3fa8a.tar.gz bcm5719-llvm-610541989a524be452a5674cd3fb78304ce3fa8a.zip | |
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
llvm-svn: 174601
Diffstat (limited to 'clang/test/CodeGenOpenCL')
| -rw-r--r-- | clang/test/CodeGenOpenCL/opencl_types.cl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGenOpenCL/opencl_types.cl b/clang/test/CodeGenOpenCL/opencl_types.cl index ab2ebe1ce71..b1e558db9b9 100644 --- a/clang/test/CodeGenOpenCL/opencl_types.cl +++ b/clang/test/CodeGenOpenCL/opencl_types.cl @@ -1,5 +1,8 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -O0 | FileCheck %s +constant sampler_t glb_smp = 7; +// CHECK: global i32 7 + void fnc1(image1d_t img) {} // CHECK: @fnc1(%opencl.image1d_t* @@ -18,7 +21,17 @@ void fnc2arr(image2d_array_t img) {} void fnc3(image3d_t img) {} // CHECK: @fnc3(%opencl.image3d_t* +void fnc4smp(sampler_t s) {} +// CHECK: define void @fnc4smp(i32 + kernel void foo(image1d_t img) { + sampler_t smp = 5; +// CHECK: alloca i32 event_t evt; // CHECK: alloca %opencl.event_t* +// CHECK: store i32 5, + fnc4smp(smp); +// CHECK: call void @fnc4smp(i32 + fnc4smp(glb_smp); +// CHECK: call void @fnc4smp(i32 } |

