Skip to content

Commit 6bea703

Browse files
[ESIMD] Don't invoke sycl-post-link in clang tests (#3651)
Removed checks are performed in other places: in llvm and llvm-spirv components.
1 parent 680adc0 commit 6bea703

File tree

2 files changed

+7
-29
lines changed

2 files changed

+7
-29
lines changed

clang/test/CodeGenSYCL/esimd-accessor-ptr-md.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
// TODO: previously code generation and ESIMD lowering was
2-
// a part of the same %clang_cc1 invocation, but now it is
3-
// separate. So, we can split this test into 2, where one
4-
// will be testing code generation and the second ESIMD lowering.
5-
//
61
// RUN: %clang_cc1 -fsycl-is-device \
72
// RUN: -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice \
8-
// RUN: -disable-llvm-passes -emit-llvm %s -o %t
9-
// RUN: sycl-post-link -split-esimd -lower-esimd -O0 -S %t -o %t.table
10-
// RUN: FileCheck %s -input-file=%t_esimd_0.ll
3+
// RUN: -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
114

125
// This test checks
13-
// 1) proper metadata generation for accessors used in ESIMD
14-
// kernels:
15-
// - Proper 'kernel_arg_accessor_ptr' metadata is generated by the FE for
16-
// ESIMD kernels
17-
// - Pointers originating from accessors are marked with 'buffer_t' and proper
18-
// argument kind.
6+
// 1) Proper 'kernel_arg_accessor_ptr' metadata is generated by the FE for
7+
// ESIMD kernels.
198
// 2) __init_esimd function is used to initialize the accessor rather than
209
// __init.
2110

@@ -38,10 +27,6 @@ void test(int val) {
3827

3928
// --- Name
4029
// CHECK-LABEL: define {{.*}}spir_kernel void @"_ZTSZZ4testiENK3$_0clERN2cl4sycl7handlerEE12esimd_kernel"(
41-
// --- Signature
42-
// CHECK: i32 addrspace(1)* "VCArgumentDesc"="buffer_t" "VCArgumentIOKind"="0" "VCArgumentKind"="2" %_arg_,
43-
// CHECK: i32 "VCArgumentDesc" "VCArgumentIOKind"="0" "VCArgumentKind"="0" %_arg_1,
44-
// CHECK: i32 addrspace(1)* "VCArgumentDesc"="buffer_t" "VCArgumentIOKind"="0" "VCArgumentKind"="2" %_arg_3)
4530
// --- Attributes
4631
// CHECK: {{.*}} !kernel_arg_accessor_ptr ![[ACC_PTR_ATTR:[0-9]+]] !sycl_explicit_simd !{{[0-9]+}} {{.*}}{
4732
// --- init_esimd call is expected instead of __init:
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
// TODO: previously code generation and ESIMD lowering was
2-
// a part of the same %clang_cc1 invocation, but now it is
3-
// separate. So, we can split this test into 2, where one
4-
// will be testing code generation and the second ESIMD lowering.
5-
//
61
// RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice \
7-
// RUN: -fsycl-is-device -emit-llvm %s -o %t
8-
// RUN: sycl-post-link -split-esimd -lower-esimd -O0 -S %t -o %t.table
9-
// RUN: FileCheck %s -input-file=%t_esimd_0.ll
2+
// RUN: -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
103

11-
// This test checks that FE allows globals with register_num attribute in ESIMD mode.
4+
// This test checks that FE generates appropriate attributes for ESIMD private globals with register_num attribute.
125

136
__attribute__((opencl_private)) __attribute__((sycl_explicit_simd)) __attribute__((register_num(17))) int vc;
14-
// CHECK: @vc = {{.+}} i32 0, align 4 #0
7+
// CHECK: @vc = {{.+}} i32 0, align 4 #[[ATTR:[0-9]+]]
158

169
template <typename name, typename Func>
1710
__attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
@@ -24,4 +17,4 @@ void init_vc(int x) {
2417
// CHECK: store i32 %{{[0-9a-zA-Z_]+}}, i32* @vc
2518
});
2619
}
27-
// CHECK: attributes #0 = {{.*"VCByteOffset"="17".*"VCVolatile"}}
20+
// CHECK: attributes #[[ATTR]] = { "genx_byte_offset"="17" "genx_volatile" }

0 commit comments

Comments
 (0)