[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGenOpenCL / spir64_target.cl
blobba4a66d7158fd52f3ae8b36360cd2027473c1b08
1 // RUN: %clang_cc1 %s -triple "spir64-unknown-unknown" -emit-llvm -o - | FileCheck %s
3 // CHECK: target triple = "spir64-unknown-unknown"
5 typedef struct {
6 char c;
7 void *v;
8 void *v2;
9 } my_st;
11 kernel void foo(global long *arg) {
12 int res1[sizeof(my_st) == 24 ? 1 : -1];
13 int res2[sizeof(void *) == 8 ? 1 : -1];
14 int res3[sizeof(arg) == 8 ? 1 : -1];
16 my_st *tmp = 0;
17 arg[3] = (long)(&tmp->v);
18 //CHECK: store i64 8, ptr addrspace(1)
19 arg[4] = (long)(&tmp->v2);
20 //CHECK: store i64 16, ptr addrspace(1)