diff options
author | Guy Benyei <guy.benyei@intel.com> | 2013-01-20 12:31:11 +0000 |
---|---|---|
committer | Guy Benyei <guy.benyei@intel.com> | 2013-01-20 12:31:11 +0000 |
commit | 1b4fb3e08b28f12d508aec0bbdcb6f41cfb0ee38 (patch) | |
tree | 5cf8e9985a92136f34520167b6a007eb00fe1468 /clang/test/CodeGenOpenCL | |
parent | 359e09d4f50f381dc85d64bc7ea4e06013d09779 (diff) | |
download | bcm5719-llvm-1b4fb3e08b28f12d508aec0bbdcb6f41cfb0ee38.tar.gz bcm5719-llvm-1b4fb3e08b28f12d508aec0bbdcb6f41cfb0ee38.zip |
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)
llvm-svn: 172973
Diffstat (limited to 'clang/test/CodeGenOpenCL')
-rw-r--r-- | clang/test/CodeGenOpenCL/event_t.cl | 12 | ||||
-rw-r--r-- | clang/test/CodeGenOpenCL/opencl_types.cl | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenOpenCL/event_t.cl b/clang/test/CodeGenOpenCL/event_t.cl new file mode 100644 index 00000000000..ddf12a9d8b9 --- /dev/null +++ b/clang/test/CodeGenOpenCL/event_t.cl @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - -O0 | FileCheck %s + +void foo(event_t evt); + +void kernel ker() { + event_t e; +// CHECK: alloca %opencl.event_t*, + foo(e); +// CHECK: call void @foo(%opencl.event_t* % + foo(0); +// CHECK: call void @foo(%opencl.event_t* null) +} diff --git a/clang/test/CodeGenOpenCL/opencl_types.cl b/clang/test/CodeGenOpenCL/opencl_types.cl index 35444ed9cbf..ab2ebe1ce71 100644 --- a/clang/test/CodeGenOpenCL/opencl_types.cl +++ b/clang/test/CodeGenOpenCL/opencl_types.cl @@ -19,4 +19,6 @@ void fnc3(image3d_t img) {} // CHECK: @fnc3(%opencl.image3d_t* kernel void foo(image1d_t img) { + event_t evt; +// CHECK: alloca %opencl.event_t* } |