blob: cdcd7eef2ed4602985a1112629f50551c8fb993a [file] [log] [blame]
Egor Churaev89831422016-12-23 14:55:49 +00001// RUN: %clang_cc1 -O0 -cl-std=CL2.0 -emit-llvm %s -o - | FileCheck %s
2extern queue_t get_default_queue();
3
4bool compare() {
5 return 0 == get_default_queue() &&
6 get_default_queue() == 0;
7 // CHECK: icmp eq %opencl.queue_t* null, %{{.*}}
8 // CHECK: icmp eq %opencl.queue_t* %{{.*}}, null
9}
10
11void func(queue_t q);
12
13void init() {
14 queue_t q = 0;
15 func(0);
16 // CHECK: store %opencl.queue_t* null, %opencl.queue_t** %q
17 // CHECK: call void @func(%opencl.queue_t* null)
18}