1
- // RUN: %clang_cc1 -fclangir -emit-cir -triple x86_64 -unknown-linux-gnu %s -o %t.cir
1
+ // RUN: %clang_cc1 -fclangir -emit-cir -triple spirv64 -unknown-unknown %s -o %t.cir
2
2
// RUN: FileCheck %s --input-file=%t.cir --check-prefix=CIR
3
- // RUN: %clang_cc1 -fclangir -emit-llvm -triple x86_64 -unknown-linux-gnu %s -o %t.ll
3
+ // RUN: %clang_cc1 -fclangir -emit-llvm -triple spirv64 -unknown-unknown %s -o %t.ll
4
4
// RUN: FileCheck %s --input-file=%t.ll --check-prefix=LLVM
5
5
6
6
typedef unsigned int uint4 __attribute__((ext_vector_type (4 )));
@@ -11,7 +11,7 @@ kernel __attribute__((vec_type_hint(int))) __attribute__((reqd_work_group_size(
11
11
// CIR-DAG: #fn_attr[[KERNEL1:[0-9]*]] = {{.+}}cl.kernel_metadata = #cir.cl.kernel_metadata<reqd_work_group_size = [1 : i32, 2 : i32, 4 : i32], vec_type_hint = !s32i, vec_type_hint_signedness = 1>{{.+}}
12
12
// CIR-DAG: cir.func @kernel1{{.+}} extra(#fn_attr[[KERNEL1]])
13
13
14
- // LLVM-DAG: define{{.*}} @kernel1(i32 {{[^%]*}}%0) {{[^{]+}} !reqd_work_group_size ![[MD1_REQD_WG:[0-9]+]] !vec_type_hint ![[MD1_VEC_TYPE:[0-9]+]]
14
+ // LLVM-DAG: define {{(dso_local )?}}spir_kernel void @kernel1(i32 {{[^%]*}}%0) {{[^{]+}} !reqd_work_group_size ![[MD1_REQD_WG:[0-9]+]] !vec_type_hint ![[MD1_VEC_TYPE:[0-9]+]]
15
15
// LLVM-DAG: [[MD1_VEC_TYPE]] = !{i32 undef, i32 1}
16
16
// LLVM-DAG: [[MD1_REQD_WG]] = !{i32 1, i32 2, i32 4}
17
17
@@ -21,7 +21,7 @@ kernel __attribute__((vec_type_hint(uint4))) __attribute__((work_group_size_hint
21
21
// CIR-DAG: #fn_attr[[KERNEL2:[0-9]*]] = {{.+}}cl.kernel_metadata = #cir.cl.kernel_metadata<work_group_size_hint = [8 : i32, 16 : i32, 32 : i32], vec_type_hint = !cir.vector<!u32i x 4>, vec_type_hint_signedness = 0>{{.+}}
22
22
// CIR-DAG: cir.func @kernel2{{.+}} extra(#fn_attr[[KERNEL2]])
23
23
24
- // LLVM-DAG: define{{.*}} @kernel2(i32 {{[^%]*}}%0) {{[^{]+}} !vec_type_hint ![[MD2_VEC_TYPE:[0-9]+]] !work_group_size_hint ![[MD2_WG_SIZE:[0-9]+]]
24
+ // LLVM-DAG: define {{(dso_local )?}}spir_kernel void @kernel2(i32 {{[^%]*}}%0) {{[^{]+}} !vec_type_hint ![[MD2_VEC_TYPE:[0-9]+]] !work_group_size_hint ![[MD2_WG_SIZE:[0-9]+]]
25
25
// LLVM-DAG: [[MD2_VEC_TYPE]] = !{<4 x i32> undef, i32 0}
26
26
// LLVM-DAG: [[MD2_WG_SIZE]] = !{i32 8, i32 16, i32 32}
27
27
@@ -31,5 +31,5 @@ kernel __attribute__((intel_reqd_sub_group_size(8))) void kernel3(int a) {}
31
31
// CIR-DAG: #fn_attr[[KERNEL3:[0-9]*]] = {{.+}}cl.kernel_metadata = #cir.cl.kernel_metadata<intel_reqd_sub_group_size = 8 : i32>{{.+}}
32
32
// CIR-DAG: cir.func @kernel3{{.+}} extra(#fn_attr[[KERNEL3]])
33
33
34
- // LLVM-DAG: define{{.*}} @kernel3(i32 {{[^%]*}}%0) {{[^{]+}} !intel_reqd_sub_group_size ![[MD3_INTEL:[0-9]+]]
34
+ // LLVM-DAG: define {{(dso_local )?}}spir_kernel void @kernel3(i32 {{[^%]*}}%0) {{[^{]+}} !intel_reqd_sub_group_size ![[MD3_INTEL:[0-9]+]]
35
35
// LLVM-DAG: [[MD3_INTEL]] = !{i32 8}
0 commit comments