1 // RUN
: %clang_cc1 %s -triple
"spirv32-unknown-unknown" -verify -emit-llvm -o - | FileCheck %s -check-prefix
=SPIRV32
2 // RUN
: %clang_cc1 %s -triple
"spirv64-unknown-unknown" -verify -emit-llvm -o - | FileCheck %s -check-prefix
=SPIRV64
4 // SPIRV32
: target triple
= "spirv32-unknown-unknown"
5 // SPIRV64
: target triple
= "spirv64-unknown-unknown"
13 kernel void foo
(global long
*arg
) {
15 int res1
[sizeof
(my_st) == 12 ?
1 : -
1]; // expected-no-diagnostics
16 int res2
[sizeof
(void *) == 4 ?
1 : -
1]; // expected-no-diagnostics
17 int res3
[sizeof
(arg) == 4 ?
1 : -
1]; // expected-no-diagnostics
18 #elif __SPIRV64__
== 1
19 int res1
[sizeof
(my_st) == 24 ?
1 : -
1]; // expected-no-diagnostics
20 int res2
[sizeof
(void *) == 8 ?
1 : -
1]; // expected-no-diagnostics
21 int res3
[sizeof
(arg) == 8 ?
1 : -
1]; // expected-no-diagnostics
25 // SPIRV32
: store i64
4, ptr addrspace
(1)
26 // SPIRV64
: store i64
8, ptr addrspace
(1)
27 arg
[0] = (long)(&tmp->v);
28 // SPIRV32: store i64 8, ptr addrspace(1)
29 // SPIRV64: store i64 16, ptr addrspace(1)
30 arg[1] = (long)(&tmp->v2);