Skip to content

Commit eaaedc9

Browse files
[SYCL][OpaquePointers] Use opaque pointers for the last matrix tests. (#9908)
1 parent f69dd09 commit eaaedc9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sycl/test/check_device_code/matrix/matrix_load_store_as.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -S -emit-llvm -o - %s | FileCheck %s
1+
// RUN: %clangxx -fsycl-device-only -S -emit-llvm -o - %s -Xclang -opaque-pointers | FileCheck %s
22

33
// Check that SROA and mem2reg won't leave alloca of matrix type in IR
44
// CHECK-NOT: alloca target("spirv.JointMatrixINTEL"
@@ -42,16 +42,16 @@ int main(void) {
4242
it.barrier(access::fence_space::local_space);
4343

4444
// A should load from local address space
45-
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 8, 16, 0, 3, 0) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(i16 addrspace(3)* noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
45+
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 8, 16, 0, 3, 0) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(ptr addrspace(3) noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
4646
joint_matrix_load(
4747
sg, tA,
4848
tileA.template get_multi_ptr<sycl::access::decorated::yes>(), 16);
4949
// B should load from global address space
50-
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 16, 16, 2, 3, 1) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(i16 addrspace(1)* noundef %{{.*}}, i64 noundef 32, i32 noundef 2, i32 noundef 3, i32 noundef 0) #{{.*}}
50+
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 16, 16, 2, 3, 1) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(ptr addrspace(1) noundef %{{.*}}, i64 noundef 32, i32 noundef 2, i32 noundef 3, i32 noundef 0) #{{.*}}
5151
joint_matrix_load(sg, tB, pB, 32);
5252
tC = joint_matrix_mad(sg, tA, tB, tC);
5353
// C should store to global address space
54-
// CHECK: tail call spir_func void @_Z[[#]]__spirv_JointMatrixStoreINTEL{{.*}}(float addrspace(1)* noundef %{{.*}}, target("spirv.JointMatrixINTEL", float, 8, 16, 3, 3, 2) noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
54+
// CHECK: tail call spir_func void @_Z[[#]]__spirv_JointMatrixStoreINTEL{{.*}}(ptr addrspace(1) noundef %{{.*}}, target("spirv.JointMatrixINTEL", float, 8, 16, 3, 3, 2) noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
5555
joint_matrix_store(sg, tC, pC, 16, layout::row_major);
5656
});
5757
});

sycl/test/check_device_code/matrix/matrix_load_store_as_legacy.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -S -emit-llvm -o - %s | FileCheck %s
1+
// RUN: %clangxx -fsycl-device-only -S -emit-llvm -o - %s -Xclang -opaque-pointers | FileCheck %s
22

33
// Check that SROA and mem2reg won't leave alloca of matrix type in IR
44
// CHECK-NOT: alloca target("spirv.JointMatrixINTEL"
@@ -39,17 +39,17 @@ int main(void) {
3939
it.barrier(access::fence_space::local_space);
4040

4141
// A should load from local address space
42-
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 8, 16, 0, 3) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(i16 addrspace(3)* noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
42+
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 8, 16, 0, 3) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(ptr addrspace(3) noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
4343
joint_matrix_load(
4444
sg, tA,
4545
tileA.template get_multi_ptr<sycl::access::decorated::yes>(), 16,
4646
matrix_layout::row_major);
4747
// B should load from global address space
48-
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 16, 16, 3, 3) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(i16 addrspace(1)* noundef %{{.*}}, i64 noundef 32, i32 noundef [[#]], i32 noundef 3, i32 noundef 0) #{{.*}}
48+
// CHECK: %{{.*}} = tail call spir_func noundef target("spirv.JointMatrixINTEL", i16, 16, 16, 3, 3) @_Z[[#]]__spirv_JointMatrixLoadINTEL{{.*}}(ptr addrspace(1) noundef %{{.*}}, i64 noundef 32, i32 noundef [[#]], i32 noundef 3, i32 noundef 0) #{{.*}}
4949
joint_matrix_load(sg, tB, pB, 32, matrix_layout::packed_b);
5050
tC = joint_matrix_mad(sg, tA, tB, tC);
5151
// C should store to global address space
52-
// CHECK: tail call spir_func void @_Z[[#]]__spirv_JointMatrixStoreINTEL{{.*}}(float addrspace(1)* noundef %{{.*}}, target("spirv.JointMatrixINTEL", float, 8, 16, 0, 3) noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
52+
// CHECK: tail call spir_func void @_Z[[#]]__spirv_JointMatrixStoreINTEL{{.*}}(ptr addrspace(1) noundef %{{.*}}, target("spirv.JointMatrixINTEL", float, 8, 16, 0, 3) noundef %{{.*}}, i64 noundef 16, i32 noundef 0, i32 noundef 3, i32 noundef 0) #{{.*}}
5353
joint_matrix_store(sg, tC, pC, 16, matrix_layout::row_major);
5454
});
5555
});

0 commit comments

Comments
 (0)