1 // RUN
: %clang_cc1 -cl-std
=CL2.0 -O0 -emit-llvm -o - -triple amdgcn
< %s | FileCheck %s --check-prefixes
=COMMON
,AMDGPU
2 // RUN
: %clang_cc1 -cl-std
=CL2.0 -O0 -emit-llvm -o - -triple
"spir-unknown-unknown" < %s | FileCheck %s --check-prefixes
=COMMON
,SPIR32
3 // RUN
: %clang_cc1 -cl-std
=CL2.0 -O0 -emit-llvm -o - -triple
"spir64-unknown-unknown" < %s | FileCheck %s --check-prefixes
=COMMON
,SPIR64
4 // RUN
: %clang_cc1 -cl-std
=CL2.0 -O0 -debug-info-kind
=limited -gno-column-info -emit-llvm -o - -triple amdgcn
< %s | FileCheck %s --check-prefixes
=CHECK-DEBUG
6 // Check that the enqueue_kernel array temporary is in the entry block to avoid
9 typedef struct
{int a
;} ndrange_t;
11 kernel void test
(int i
) {
12 // COMMON-LABEL
: define
{{.
*}} void
@test
13 // COMMON-LABEL
: entry
:
14 // AMDGPU
: %block_sizes
= alloca
[1 x i64
]
15 // SPIR32
: %block_sizes
= alloca
[1 x i32
]
16 // SPIR64
: %block_sizes
= alloca
[1 x i64
]
17 // COMMON-LABEL
: if.then
:
19 // CHECK-DEBUG
: getelementptr
{{.
*}} %block_sizes
, {{.
*}} !dbg
![[TEMPLOCATION
:[0-
9]+]]
20 // COMMON-LABEL
: if.end
21 queue_t default_queue
;
25 enqueue_kernel
(default_queue, flags
, ndrange
, ^
(local void
*a
) { }, 32);
28 // Check that the temporary is scoped to the
`if
`
30 // CHECK-DEBUG
: ![[TESTFILE
:[0-
9]+]] = !DIFile
(filename: "<stdin>"
31 // CHECK-DEBUG
: ![[TESTSCOPE
:[0-
9]+]] = distinct
!DISubprogram
(name: "test", {{.
*}} file
: ![[TESTFILE]]
32 // CHECK-DEBUG: ![[IFSCOPE:[0-9]+]] = distinct !DILexicalBlock(scope: ![[TESTSCOPE]], file: ![[TESTFILE]], line
: 24)
33 // CHECK-DEBUG
: ![[TEMPLOCATION]] = !DILocation(line: 25, scope: ![[IFSCOPE]])