5
5
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc
6
6
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefix=CHECK-LLVM
7
7
8
- ; CHECK-SPIRV: Capability JointMatrixINTEL
9
- ; CHECK-SPIRV: Extension "SPV_INTEL_joint_matrix"
10
- ; CHECK-SPIRV: TypeInt [[#TypeInt:]] 64
11
- ; CHECK-SPIRV: TypeFloat [[#TypeFloat:]] 32
12
- ; CHECK-SPIRV: TypeJointMatrixINTEL [[#TypeMatrix:]] [[#TypeFloat]] [[#]] [[#]] [[#]] [[#]]
8
+ ; CHECK-SPIRV-DAG: Capability JointMatrixINTEL
9
+ ; CHECK-SPIRV-DAG: Capability JointMatrixWIInstructionsINTEL
10
+ ; CHECK-SPIRV-DAG: Extension "SPV_INTEL_joint_matrix"
11
+ ; CHECK-SPIRV-DAG: TypeInt [[#TypeInt32:]] 32
12
+ ; CHECK-SPIRV-DAG: TypeInt [[#TypeInt64:]] 64
13
+ ; CHECK-SPIRV-DAG: TypeFloat [[#TypeFloat:]] 32
14
+ ; CHECK-SPIRV-DAG: TypeJointMatrixINTEL [[#TypeMatrix:]] [[#TypeFloat]] [[#]] [[#]] [[#]] [[#]]
15
+ ; CHECK-SPIRV-DAG: TypeVector [[#TypeVec:]] [[#TypeInt32]] 2
13
16
; CHECK-SPIRV: Phi [[#TypeMatrix]] [[#Matrix:]]
14
- ; CHECK-SPIRV: JointMatrixWorkItemLengthINTEL [[#TypeInt ]] [[#]] [[#Matrix]]
17
+ ; CHECK-SPIRV: JointMatrixWorkItemLengthINTEL [[#TypeInt64 ]] [[#]] [[#Matrix]]
15
18
; CHECK-SPIRV: VectorExtractDynamic [[#TypeFloat]] [[#]] [[#Matrix]] [[#Index:]]
16
19
; CHECK-SPIRV: FMul [[#TypeFloat]] [[#NewVal:]] [[#]] [[#]]
17
20
; CHECK-SPIRV: VectorInsertDynamic [[#TypeMatrix]] [[#]] [[#Matrix]] [[#NewVal]] [[#Index]]
21
+ ; CHECK-SPIRV: JointMatrixGetElementCoordINTEL [[#TypeVec]] [[#]] [[#Matrix]] [[#Index]]
18
22
19
23
; CHECK-LLVM: [[Length:%.*]] = call spir_func i64 @_Z38__spirv_JointMatrixWorkItemLengthINTELPU3AS141__spirv_JointMatrixINTEL__float_16_16_0_3(ptr addrspace(1) [[Matrix:%.*]])
20
24
; CHECK-LLVM: [[Elem:%.*]] = call spir_func float @_Z28__spirv_VectorExtractDynamicPU3AS141__spirv_JointMatrixINTEL__float_16_16_0_3l(ptr addrspace(1) [[Matrix]], i64 [[Index:%.*]])
21
25
; CHECK-LLVM: [[NewVal:%.*]] = fmul float [[Elem]], 5.000000e+00
22
26
; CHECK-LLVM: {{%.*}} = call spir_func ptr addrspace(1) @_Z27__spirv_VectorInsertDynamicPU3AS141__spirv_JointMatrixINTEL__float_16_16_0_3fl(ptr addrspace(1) [[Matrix]], float [[NewVal]], i64 [[Index]])
27
+ ; CHECK-LLVM: {{%.*}} = call spir_func <2 x i32> @_Z39__spirv_JointMatrixGetElementCoordINTELPU3AS141__spirv_JointMatrixINTEL__float_16_16_0_3l(ptr addrspace(1) [[Matrix]], i64 [[Index]])
23
28
24
29
source_filename = "/work/tmp/matrix-slice.cpp"
25
30
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"
@@ -69,6 +74,7 @@ for.body.i: ; preds = %for.cond.i
69
74
%call.i.i = tail call spir_func float @_Z28__spirv_VectorExtractDynamicIfLm16ELm16ELN5__spv12MatrixLayoutE0ELNS0_5Scope4FlagE3EmET_PNS0_24__spirv_JointMatrixINTELIS4_XT0_EXT1_EXT2_EXT3_EEET4_ (%spirv.JointMatrixINTEL._float_16_16_0_3 addrspace (4 )* %A.sroa.0.0.i , i64 %conv.i ) #2
70
75
%mul.i.i = fmul float %call.i.i , 5 .000000e+00
71
76
%call5.i.i = tail call spir_func %spirv.JointMatrixINTEL._float_16_16_0_3 addrspace (4 )* @_Z27__spirv_VectorInsertDynamicIfLm16ELm16ELN5__spv12MatrixLayoutE0ELNS0_5Scope4FlagE3EmEPNS0_24__spirv_JointMatrixINTELIT_XT0_EXT1_EXT2_EXT3_EEES7_T4_S5_ (%spirv.JointMatrixINTEL._float_16_16_0_3 addrspace (4 )* %A.sroa.0.0.i , float %mul.i.i , i64 %conv.i ) #2
77
+ %call6 = tail call spir_func <2 x i32 > @_Z39__spirv_JointMatrixGetElementCoordINTELIaLm8ELm32ELN5__spv9MatrixUseE0ELNS0_12MatrixLayoutE0ELNS0_5Scope4FlagE3EEDv2_jPNS0_24__spirv_JointMatrixINTELIT_XT0_EXT1_EXT3_EXT4_EXT2_EEEm (%spirv.JointMatrixINTEL._float_16_16_0_3 addrspace (4 )* %A.sroa.0.0.i , i64 %conv.i ) #2
72
78
%inc.i = add nuw nsw i32 %i.0.i , 1
73
79
br label %for.cond.i , !llvm.loop !7
74
80
@@ -92,6 +98,9 @@ declare dso_local spir_func %spirv.JointMatrixINTEL._float_16_16_0_3 addrspace(4
92
98
; Function Attrs: convergent
93
99
declare dso_local spir_func void @_Z29__spirv_JointMatrixStoreINTELIfLm16ELm16ELN5__spv12MatrixLayoutE0ELNS0_5Scope4FlagE3EEvPT_PNS0_24__spirv_JointMatrixINTELIS4_XT0_EXT1_EXT2_EXT3_EEEmS1_S3_i (float addrspace (4 )*, %spirv.JointMatrixINTEL._float_16_16_0_3 addrspace (4 )*, i64 , i32 , i32 , i32 ) local_unnamed_addr #1
94
100
101
+ ; Function Attrs: convergent
102
+ declare dso_local spir_func <2 x i32 > @_Z39__spirv_JointMatrixGetElementCoordINTELIaLm8ELm32ELN5__spv9MatrixUseE0ELNS0_12MatrixLayoutE0ELNS0_5Scope4FlagE3EEDv2_jPNS0_24__spirv_JointMatrixINTELIT_XT0_EXT1_EXT3_EXT4_EXT2_EEEm (%spirv.JointMatrixINTEL._float_16_16_0_3 addrspace (4 )*, i64 ) #2
103
+
95
104
attributes #0 = { convergent norecurse "frame-pointer" ="all" "min-legal-vector-width" ="0" "no-trapping-math" ="true" "stack-protector-buffer-size" ="8" "sycl-module-id" ="/work/tmp/matrix-slice.cpp" "uniform-work-group-size" ="true" }
96
105
attributes #1 = { convergent "frame-pointer" ="all" "no-trapping-math" ="true" "stack-protector-buffer-size" ="8" }
97
106
attributes #2 = { convergent }
0 commit comments