2022-04-07 18:03:55 +08:00
|
|
|
// RUN: %clang_cc1 -no-opaque-pointers -O0 -cl-std=CL2.0 -emit-llvm %s -o - | FileCheck %s
|
2022-02-13 21:02:46 +08:00
|
|
|
extern queue_t get_default_queue(void);
|
2016-12-23 22:55:49 +08:00
|
|
|
|
2022-02-13 21:02:46 +08:00
|
|
|
bool compare(void) {
|
2016-12-23 22:55:49 +08:00
|
|
|
return 0 == get_default_queue() &&
|
|
|
|
get_default_queue() == 0;
|
|
|
|
// CHECK: icmp eq %opencl.queue_t* null, %{{.*}}
|
|
|
|
// CHECK: icmp eq %opencl.queue_t* %{{.*}}, null
|
|
|
|
}
|
|
|
|
|
|
|
|
void func(queue_t q);
|
|
|
|
|
2022-02-13 21:02:46 +08:00
|
|
|
void init(void) {
|
2016-12-23 22:55:49 +08:00
|
|
|
queue_t q = 0;
|
|
|
|
func(0);
|
|
|
|
// CHECK: store %opencl.queue_t* null, %opencl.queue_t** %q
|
|
|
|
// CHECK: call void @func(%opencl.queue_t* null)
|
|
|
|
}
|