Guy Benyei | b13621d | 2012-12-18 14:38:23 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - -O0 | FileCheck %s |
| 2 | |
Guy Benyei | 21f18c4 | 2013-02-07 10:55:47 +0000 | [diff] [blame] | 3 | constant sampler_t glb_smp = 7; |
| 4 | // CHECK: global i32 7 |
| 5 | |
Guy Benyei | b13621d | 2012-12-18 14:38:23 +0000 | [diff] [blame] | 6 | void fnc1(image1d_t img) {} |
| 7 | // CHECK: @fnc1(%opencl.image1d_t* |
| 8 | |
| 9 | void fnc1arr(image1d_array_t img) {} |
| 10 | // CHECK: @fnc1arr(%opencl.image1d_array_t* |
| 11 | |
| 12 | void fnc1buff(image1d_buffer_t img) {} |
| 13 | // CHECK: @fnc1buff(%opencl.image1d_buffer_t* |
| 14 | |
| 15 | void fnc2(image2d_t img) {} |
| 16 | // CHECK: @fnc2(%opencl.image2d_t* |
| 17 | |
| 18 | void fnc2arr(image2d_array_t img) {} |
| 19 | // CHECK: @fnc2arr(%opencl.image2d_array_t* |
| 20 | |
| 21 | void fnc3(image3d_t img) {} |
| 22 | // CHECK: @fnc3(%opencl.image3d_t* |
| 23 | |
Guy Benyei | 21f18c4 | 2013-02-07 10:55:47 +0000 | [diff] [blame] | 24 | void fnc4smp(sampler_t s) {} |
| 25 | // CHECK: define void @fnc4smp(i32 |
| 26 | |
Guy Benyei | b13621d | 2012-12-18 14:38:23 +0000 | [diff] [blame] | 27 | kernel void foo(image1d_t img) { |
Guy Benyei | 21f18c4 | 2013-02-07 10:55:47 +0000 | [diff] [blame] | 28 | sampler_t smp = 5; |
| 29 | // CHECK: alloca i32 |
Guy Benyei | e6b9d80 | 2013-01-20 12:31:11 +0000 | [diff] [blame] | 30 | event_t evt; |
| 31 | // CHECK: alloca %opencl.event_t* |
Guy Benyei | 21f18c4 | 2013-02-07 10:55:47 +0000 | [diff] [blame] | 32 | // CHECK: store i32 5, |
| 33 | fnc4smp(smp); |
| 34 | // CHECK: call void @fnc4smp(i32 |
| 35 | fnc4smp(glb_smp); |
| 36 | // CHECK: call void @fnc4smp(i32 |
Guy Benyei | b13621d | 2012-12-18 14:38:23 +0000 | [diff] [blame] | 37 | } |