File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
test/transcoding/SPV_INTEL_joint_matrix Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ bool isSYCLHalfType(llvm::Type *Ty) {
288288 return false ;
289289 StringRef Name = ST->getName ();
290290 Name.consume_front (" class." );
291- if ((Name.startswith (" cl::sycl::" ) ||
291+ if ((Name.startswith (" sycl:: " ) || Name. startswith ( " cl::sycl::" ) ||
292292 Name.startswith (" __sycl_internal::" )) &&
293293 Name.endswith (" ::half" )) {
294294 return true ;
@@ -303,7 +303,7 @@ bool isSYCLBfloat16Type(llvm::Type *Ty) {
303303 return false ;
304304 StringRef Name = ST->getName ();
305305 Name.consume_front (" class." );
306- if ((Name.startswith (" cl::sycl::" ) ||
306+ if ((Name.startswith (" sycl:: " ) || Name. startswith ( " cl::sycl::" ) ||
307307 Name.startswith (" __sycl_internal::" )) &&
308308 Name.endswith (" ::bfloat16" )) {
309309 return true ;
Original file line number Diff line number Diff line change 1+ ; RUN: llvm-as %s -o %t.bc
2+ ; RUN: llvm-spirv %t.bc -spirv-ext=+SPV_INTEL_joint_matrix -o %t.spv
3+ ; RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s
4+ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
5+ target triple = "spir64-unknown-unknown"
6+
7+ ; Ensure that ::sycl::_V1.*{half|bfloat16} are parsed as SYCL types.
8+
9+ ; CHECK-DAG: TypeFloat [[#HalfTy:]] 16
10+ ; CHECK-DAG: TypeInt [[#BFloat16Ty:]] 16
11+
12+ %"class.sycl::_V1::anything::half" = type { half }
13+ %"class.sycl::_V1::anything::bfloat16" = type { i16 }
14+
15+ %"struct.__spv::__spirv_JointMatrixINTEL.half" = type { [2 x [2 x [1 x [4 x %"class.sycl::_V1::anything::half" ]]]]* }
16+ %"struct.__spv::__spirv_JointMatrixINTEL.bfloat16" = type { [2 x [2 x [1 x [4 x %"class.sycl::_V1::anything::bfloat16" ]]]]* }
17+
18+ define spir_func void @foo (%"struct.__spv::__spirv_JointMatrixINTEL.half" *) {
19+ ret void
20+ }
21+
22+ define spir_func void @bar (%"struct.__spv::__spirv_JointMatrixINTEL.bfloat16" *) {
23+ ret void
24+ }
You can’t perform that action at this time.
0 commit comments