1 | // RUN: %clang_cc1 -O0 -cl-std=CL2.0 -emit-llvm %s -o - | FileCheck %s |
---|---|
2 | extern queue_t get_default_queue(); |
3 | |
4 | bool 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 | |
11 | void func(queue_t q); |
12 | |
13 | void 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 | } |
19 |