Skip to content

Commit 9668871

Browse files
[SYCL][NFC] Make tests insensitive to dso_local (#3037)
These tests fail after a recent open-source clang change done to set dso_local in frontend. Signed-off-by: Elizabeth Andrews <[email protected]>
1 parent 9c13694 commit 9668871

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+143
-145
lines changed

clang/test/CodeGenSYCL/accessor_inheritance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
// Check kernel parameters
2424
// CHECK: %[[RANGE_TYPE:"struct.*cl::sycl::range"]]
2525
// CHECK: %[[ID_TYPE:"struct.*cl::sycl::id"]]
26-
// CHECK: define spir_kernel void @_ZTSZ4mainE6kernel
26+
// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE6kernel
2727
// CHECK-SAME: i32 [[ARG_A:%[a-zA-Z0-9_]+]],
2828
// CHECK-SAME: i32 [[ARG_B:%[a-zA-Z0-9_]+]],
2929
// CHECK-SAME: i8 addrspace(1)* [[ACC1_DATA:%[a-zA-Z0-9_]+]],

clang/test/CodeGenSYCL/address-space-new.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void test() {
103103
//
104104
Y yy;
105105
baz(yy);
106-
// CHECK: define spir_func void @{{.*}}baz{{.*}}
106+
// CHECK: define {{.*}}spir_func void @{{.*}}baz{{.*}}
107107
// CHECK: %[[FIRST:[a-zA-Z0-9]+]] = bitcast %struct.{{.*}}.Y addrspace(4)* %{{.*}} to i8 addrspace(4)*
108108
// CHECK: %[[OFFSET:[a-zA-Z0-9]+]].ptr = getelementptr inbounds i8, i8 addrspace(4)* %[[FIRST]], i64 8
109109
// CHECK: %[[SECOND:[a-zA-Z0-9]+]] = bitcast i8 addrspace(4)* %[[OFFSET]].ptr to %struct.{{.*}}.HasX addrspace(4)*

clang/test/CodeGenSYCL/address-space-of-returns.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A ret_agg() {
2626
A a;
2727
return a;
2828
}
29-
// CHECK: define spir_func void @{{.*}}ret_agg{{.*}}(%struct.{{.*}}.A addrspace(4)* {{.*}} %agg.result)
29+
// CHECK: define {{.*}}spir_func void @{{.*}}ret_agg{{.*}}(%struct.{{.*}}.A addrspace(4)* {{.*}} %agg.result)
3030

3131
template <typename name, typename Func>
3232
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22
void bar(int & Data) {}
3-
// CHECK-DAG: define spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](i32 addrspace(4)* align 4 dereferenceable(4) %
3+
// CHECK-DAG: define {{.*}}spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](i32 addrspace(4)* align 4 dereferenceable(4) %
44
void bar2(int & Data) {}
5-
// CHECK-DAG: define spir_func void @[[RAW_REF2:[a-zA-Z0-9_]+]](i32 addrspace(4)* align 4 dereferenceable(4) %
5+
// CHECK-DAG: define {{.*}}spir_func void @[[RAW_REF2:[a-zA-Z0-9_]+]](i32 addrspace(4)* align 4 dereferenceable(4) %
66
void bar(__attribute__((opencl_local)) int &Data) {}
7-
// CHECK-DAG: define spir_func void [[LOC_REF:@[a-zA-Z0-9_]+]](i32 addrspace(3)* align 4 dereferenceable(4) %
7+
// CHECK-DAG: define {{.*}}spir_func void [[LOC_REF:@[a-zA-Z0-9_]+]](i32 addrspace(3)* align 4 dereferenceable(4) %
88
void bar3(__attribute__((opencl_global)) int &Data) {}
9-
// CHECK-DAG: define spir_func void @[[GLOB_REF:[a-zA-Z0-9_]+]](i32 addrspace(1)* align 4 dereferenceable(4) %
9+
// CHECK-DAG: define {{.*}}spir_func void @[[GLOB_REF:[a-zA-Z0-9_]+]](i32 addrspace(1)* align 4 dereferenceable(4) %
1010
void foo(int * Data) {}
11-
// CHECK-DAG: define spir_func void @[[RAW_PTR:[a-zA-Z0-9_]+]](i32 addrspace(4)* %
11+
// CHECK-DAG: define {{.*}}spir_func void @[[RAW_PTR:[a-zA-Z0-9_]+]](i32 addrspace(4)* %
1212
void foo2(int * Data) {}
13-
// CHECK-DAG: define spir_func void @[[RAW_PTR2:[a-zA-Z0-9_]+]](i32 addrspace(4)* %
13+
// CHECK-DAG: define {{.*}}spir_func void @[[RAW_PTR2:[a-zA-Z0-9_]+]](i32 addrspace(4)* %
1414
void foo(__attribute__((opencl_local)) int *Data) {}
15-
// CHECK-DAG: define spir_func void [[LOC_PTR:@[a-zA-Z0-9_]+]](i32 addrspace(3)* %
15+
// CHECK-DAG: define {{.*}}spir_func void [[LOC_PTR:@[a-zA-Z0-9_]+]](i32 addrspace(3)* %
1616
void foo3(__attribute__((opencl_global)) int *Data) {}
17-
// CHECK-DAG: define spir_func void @[[GLOB_PTR:[a-zA-Z0-9_]+]](i32 addrspace(1)* %
17+
// CHECK-DAG: define {{.*}}spir_func void @[[GLOB_PTR:[a-zA-Z0-9_]+]](i32 addrspace(1)* %
1818

1919
template<typename T>
2020
void tmpl(T t){}

clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int main() {
1919
return 0;
2020
}
2121

22-
// CHECK: define spir_kernel void @{{.*}}kernel_function
22+
// CHECK: define {{.*}}spir_kernel void @{{.*}}kernel_function
2323
// CHECK-SAME: i32 addrspace(1)* [[MEM_ARG:%[a-zA-Z0-9_]+]],
2424
// CHECK-SAME: %"struct.{{.*}}.cl::sycl::range"* byval{{.*}}align 4 [[ACC_RANGE:%[a-zA-Z0-9_]+_1]],
2525
// CHECK-SAME: %"struct.{{.*}}.cl::sycl::range"* byval{{.*}}align 4 [[MEM_RANGE:%[a-zA-Z0-9_]+_2]],

clang/test/CodeGenSYCL/device-functions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main() {
2121
kernel_single_task<class fake_kernel>([]() { foo(); });
2222
return 0;
2323
}
24-
// CHECK: define spir_kernel void @_ZTSZ4mainE11fake_kernel()
24+
// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE11fake_kernel()
2525
// CHECK: define internal spir_func void @"_ZZ4mainENK3$_0clEv"(%"class.{{.*}}.anon" addrspace(4)* {{[^,]*}} %this)
26-
// CHECK: define spir_func void @_Z3foov()
26+
// CHECK: define {{.*}}spir_func void @_Z3foov()
2727
// CHECK: define linkonce_odr spir_func i32 @_Z3barIiET_S0_(i32 %arg)

clang/test/CodeGenSYCL/device-indirectly-callable-attr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ void foo() {
77
helper();
88
}
99

10-
// CHECK: define spir_func void @{{.*foo.*}}() #[[ATTRS_INDIR_CALL:[0-9]+]]
10+
// CHECK: define {{.*}}spir_func void @{{.*foo.*}}() #[[ATTRS_INDIR_CALL:[0-9]+]]
1111
// CHECK: call spir_func void @{{.*helper.*}}()
1212
//
13-
// CHECK: define spir_func void @{{.*helper.*}}() #[[ATTRS_NOT_INDIR_CALL:[0-9]+]]
13+
// CHECK: define {{.*}}spir_func void @{{.*helper.*}}() #[[ATTRS_NOT_INDIR_CALL:[0-9]+]]
1414
//
1515

1616
int bar20(int a) { return a + 20; }
1717

1818
class A {
1919
public:
2020
// CHECK-DAG: define linkonce_odr spir_func void @_ZN1A3fooEv{{.*}}#[[ATTRS_INDIR_CALL]]
21-
// CHECK-DAG: define spir_func i32 @_Z5bar20{{.*}}#[[ATTRS_NOT_INDIR_CALL]]
21+
// CHECK-DAG: define {{.*}}spir_func i32 @_Z5bar20{{.*}}#[[ATTRS_NOT_INDIR_CALL]]
2222
[[intel::device_indirectly_callable]] void foo() { bar20(10); }
2323

2424
// CHECK-DAG: define linkonce_odr spir_func void @_ZN1AC1Ev{{.*}}#[[ATTRS_INDIR_CALL_1:[0-9]+]]

clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ int main() {
2626
}
2727

2828
// Ensure that the SPIR-Kernel function is actually emitted.
29-
// CHECK: define spir_kernel void @_ZTSZN7DERIVEDIiE10initializeEvE2FF
30-
29+
// CHECK: define {{.*}}spir_kernel void @_ZTSZN7DERIVEDIiE10initializeEvE2FF

clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ int main() {
3131
}
3232

3333
// Ensure that the SPIR-Kernel function is actually emitted.
34-
// CHECK: define spir_kernel void @_ZTSZ2TTIiEvvE2PP
35-
34+
// CHECK: define {{.*}}spir_kernel void @_ZTSZ2TTIiEvvE2PP

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void test(int val) {
3030
});
3131

3232
// --- Name
33-
// CHECK-LABEL: define spir_kernel void @"_ZTSZZ4testiENK3$_0clERN2cl4sycl7handlerEE12esimd_kernel"(
33+
// CHECK-LABEL: define {{.*}}spir_kernel void @"_ZTSZZ4testiENK3$_0clERN2cl4sycl7handlerEE12esimd_kernel"(
3434
// --- Signature
3535
// CHECK: i32 addrspace(1)* "VCArgumentDesc"="buffer_t" "VCArgumentIOKind"="0" "VCArgumentKind"="2" %_arg_,
3636
// CHECK: i32 "VCArgumentDesc" "VCArgumentIOKind"="0" "VCArgumentKind"="0" %_arg_1,

0 commit comments

Comments
 (0)