Skip to content

Commit d52760f

Browse files
authored
[SYCL][clang][NFC] Correct clang LIT tests (#9097)
CodeGenSYCL/kernel-op-calls.cpp : Do not check exact numbers since they may vary if for example one more attribute is applied. CodegenSYCL/sycl-add-opt-level-attrib.cpp : Real SYCL headers should not be included into clang LIT tests, this may cause a lot of problems during testing. Include mock headers instead.
1 parent 93e8ca3 commit d52760f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/test/CodeGenSYCL/kernel-op-calls.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ int main() {
4141

4242
Q.submit([&](sycl::handler& cgh) {
4343
Functor1 F;
44-
// CHECK: define dso_local spir_kernel void @_ZTS8Functor1() #0 !srcloc !11 !kernel_arg_buffer_location !12 !intel_reqd_sub_group_size !13 !sycl_fixed_targets !12 {
44+
// CHECK: define dso_local spir_kernel void @_ZTS8Functor1() {{.*}} !kernel_arg_buffer_location !{{[0-9]+}} !intel_reqd_sub_group_size !{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
4545
cgh.parallel_for(sycl::range<1>(10), F);
4646
});
4747

4848
Q.submit([&](sycl::handler& cgh) {
4949
kernels K;
50-
// CHECK: define dso_local spir_kernel void @_ZTS7kernels() #0 !srcloc !15 !kernel_arg_buffer_location !12 !work_group_size_hint !16 !sycl_fixed_targets !12 {
50+
// CHECK: define dso_local spir_kernel void @_ZTS7kernels() {{.*}} !kernel_arg_buffer_location !{{[0-9]+}} !work_group_size_hint !{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
5151
cgh.parallel_for(sycl::range<1>(10), K);
5252
});
5353

5454
Q.submit([&](sycl::handler& cgh) {
5555
ESIMDFunctor EF;
56-
// CHECK: define dso_local spir_kernel void @_ZTS12ESIMDFunctor() #0 !srcloc !17 !intel_reqd_sub_group_size !18 !work_group_size_hint !16 !kernel_arg_addr_space !12 !kernel_arg_access_qual !12 !kernel_arg_type !12 !kernel_arg_base_type !12 !kernel_arg_type_qual !12 !kernel_arg_accessor_ptr !12 !sycl_explicit_simd !12 !sycl_fixed_targets !12 {
56+
// CHECK: define dso_local spir_kernel void @_ZTS12ESIMDFunctor() {{.*}} !intel_reqd_sub_group_size !{{[0-9]+}} !work_group_size_hint !{{[0-9]+}} !kernel_arg_addr_space !{{[0-9]+}} !kernel_arg_access_qual !{{[0-9]+}} !kernel_arg_type !{{[0-9]+}} !kernel_arg_base_type !{{[0-9]+}} !kernel_arg_type_qual !{{[0-9]+}} !kernel_arg_accessor_ptr !{{[0-9]+}} !sycl_explicit_simd !{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
5757
cgh.parallel_for(sycl::range<1>(10), EF);
5858
});
5959

clang/test/CodeGenSYCL/sycl-add-opt-level-attrib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// This test checks adding of the attribute 'sycl-optlevel'
77
// by the clang front-end
88

9-
#include <sycl/sycl.hpp>
9+
#include "Inputs/sycl.hpp"
1010

1111
int main() {
1212
sycl::queue q;

0 commit comments

Comments
 (0)