22
22
; CHECK-SPIRV-DAG: Constant [[#IntTy]] [[#Two:]] 2
23
23
; CHECK-SPIRV-DAG: Constant [[#IntTy]] [[#Three:]] 3
24
24
; CHECK-SPIRV-DAG: Constant [[#IntTy]] [[#Sixteen:]] 16
25
+ ; CHECK-SPIRV-DAG: Constant [[#IntTy]] [[#FortyTwo:]] 42
25
26
; CHECK-SPIRV: TypeJointMatrixINTEL [[#CTy:]] [[#ShortTy]] [[#Two]] [[#Two]] [[#Zero]] [[#Three]]
26
27
; CHECK-SPIRV: TypeJointMatrixINTEL [[#ATy:]] [[#CharTy]] [[#Two]] [[#Sixteen]] [[#Zero]] [[#Three]]
27
28
; CHECK-SPIRV: TypeJointMatrixINTEL [[#BTy:]] [[#CharTy]] [[#Sixteen]] [[#Two]] [[#Three]] [[#Three]]
39
40
; CHECK-SPIRV: JointMatrixLoadINTEL [[#ATy]] [[#A:]] [[#Aptr:]] [[#Stride]] [[#Zero]] [[#Three]] [[#Zero]]
40
41
; CHECK-SPIRV: JointMatrixLoadINTEL [[#BTy]] [[#B:]] [[#Bptr:]] [[#Stride]] [[#Zero]] [[#Three]] [[#Zero]]
41
42
; CHECK-SPIRV: JointMatrixMadINTEL [[#CTy]] [[#CMad]] [[#A]] [[#B]] [[#C]] [[#Three]]
42
-
43
43
; CHECK-SPIRV: JointMatrixStoreINTEL [[#Cptr:]] [[#C]] [[#Stride]] [[#Zero]] [[#Three]] [[#Zero]]
44
+ ; CHECK-SPIRV: CompositeConstruct [[#CTy]] [[#Cnew:]] [[#FortyTwo]]
45
+ ; CHECK-SPIRV: Store [[#PtrToZero:]] [[#Zero]]
46
+ ; CHECK-SPIRV: Load [[#]] [[#ZeroLoad:]] [[#PtrToZero]]
47
+ ; CHECK-SPIRV: CompositeConstruct [[#CTy]] [[#CnewLoad:]] [[#ZeroLoad]]
48
+
44
49
45
50
; CHECK-LLVM: %spirv.JointMatrixINTEL._short_2_2_0_3
46
51
; CHECK-LLVM: %spirv.JointMatrixINTEL._char_2_16_0_3
51
56
; CHECK-LLVM: [[A:%.*]] = call spir_func %spirv.JointMatrixINTEL._char_2_16_0_3 addrspace(1)* @_Z77__spirv_JointMatrixLoadINTEL_RPU3AS139__spirv_JointMatrixINTEL__char_2_16_0_3PU3AS4cliii(i8 addrspace(4)* [[APtr:%.*]], i64 [[Stride]], i32 0, i32 3, i32 0)
52
57
; CHECK-LLVM: [[B:%.*]] = call spir_func %spirv.JointMatrixINTEL._char_16_2_3_3 addrspace(1)* @_Z77__spirv_JointMatrixLoadINTEL_RPU3AS139__spirv_JointMatrixINTEL__char_16_2_3_3PU3AS4cliii(i8 addrspace(4)* [[BPtr:%.*]], i64 [[Stride]], i32 0, i32 3, i32 0)
53
58
; CHECK-LLVM: [[CMad:%.*]] = call spir_func %spirv.JointMatrixINTEL._short_2_2_0_3 addrspace(1)* @_Z27__spirv_JointMatrixMadINTELPU3AS139__spirv_JointMatrixINTEL__char_2_16_0_3PU3AS139__spirv_JointMatrixINTEL__char_16_2_3_3PU3AS139__spirv_JointMatrixINTEL__short_2_2_0_3i(%spirv.JointMatrixINTEL._char_2_16_0_3 addrspace(1)* [[A]], %spirv.JointMatrixINTEL._char_16_2_3_3 addrspace(1)* [[B]], %spirv.JointMatrixINTEL._short_2_2_0_3 addrspace(1)* [[C]], i32 3)
54
-
55
59
; CHECK-LLVM: call spir_func void @_Z29__spirv_JointMatrixStoreINTELPU3AS4sPU3AS139__spirv_JointMatrixINTEL__short_2_2_0_3liii(i16 addrspace(4)* [[CPtr]], %spirv.JointMatrixINTEL._short_2_2_0_3 addrspace(1)* [[C]], i64 [[Stride]], i32 0, i32 3, i32 0)
56
-
60
+ ; CHECK-LLVM: call spir_func %spirv.JointMatrixINTEL._short_2_2_0_3 addrspace(1)* @_Z26__spirv_CompositeConstructi(i32 42)
61
+ ; CHECK-LLVM: store i32 0, i32 addrspace(4)* [[StoredZero:%.*]], align 4
62
+ ; CHECK-LLVM: [[LoadedZero:%.*]] = load i32, i32 addrspace(4)* [[StoredZero]], align 8
63
+ ; CHECK-LLVM: call spir_func %spirv.JointMatrixINTEL._short_2_2_0_3 addrspace(1)* @_Z26__spirv_CompositeConstructi(i32 [[LoadedZero]])
57
64
58
65
; ModuleID = 'joint_matrix_test-sycl-spir64-unknown-unknown.bc'
59
66
source_filename = "./joint_matrix_test.cpp"
@@ -119,6 +126,13 @@ for.body.i: ; preds = %for.cond.i
119
126
120
127
_ZZ4mainENKUlN2cl4sycl7nd_itemILi2EEEE_clES2_.exit: ; preds = %for.cond.i
121
128
tail call spir_func void @_Z29__spirv_JointMatrixStoreINTELIsLm2ELm2ELN5__spv12MatrixLayoutE0ELNS0_5Scope4FlagE3EEvPT_PNS0_24__spirv_JointMatrixINTELIS4_XT0_EXT1_EXT2_EXT3_EEEmS1_S3_i (i16 addrspace (4 )* %add.ptr7.i , %"struct.__spv::__spirv_JointMatrixINTEL" addrspace (4 )* %C.0.i , i64 %_arg_1 , i32 0 , i32 3 , i32 0 ) #3
129
+ %C.0.i.new = call spir_func %"struct.__spv::__spirv_JointMatrixINTEL" addrspace (4 )* @_Z26__spirv_CompositeConstructi (i32 42 ) #1
130
+ %ref.tmp = alloca i32 , align 4
131
+ %ref.tmp.ascast = addrspacecast i32* %ref.tmp to i32 addrspace (4 )*
132
+ store i32 0 , i32 addrspace (4 )* %ref.tmp.ascast , align 4
133
+ %zero = load i32 , i32 addrspace (4 )* %ref.tmp.ascast , align 8
134
+ %C.0.i.new.load = call spir_func %"struct.__spv::__spirv_JointMatrixINTEL" addrspace (4 )* @_Z26__spirv_CompositeConstructi (i32 %zero ) #1
135
+
122
136
ret void
123
137
}
124
138
@@ -137,6 +151,9 @@ declare dso_local spir_func %"struct.__spv::__spirv_JointMatrixINTEL" addrspace(
137
151
; Function Attrs: convergent
138
152
declare dso_local spir_func void @_Z29__spirv_JointMatrixStoreINTELIsLm2ELm2ELN5__spv12MatrixLayoutE0ELNS0_5Scope4FlagE3EEvPT_PNS0_24__spirv_JointMatrixINTELIS4_XT0_EXT1_EXT2_EXT3_EEEmS1_S3_i (i16 addrspace (4 )*, %"struct.__spv::__spirv_JointMatrixINTEL" addrspace (4 )*, i64 , i32 , i32 , i32 ) local_unnamed_addr #1
139
153
154
+ ; Function Attrs: convergent
155
+ declare dso_local spir_func %"struct.__spv::__spirv_JointMatrixINTEL" addrspace (4 )* @_Z26__spirv_CompositeConstructi (i32 ) #1
156
+
140
157
; Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn
141
158
declare void @llvm.assume (i1 noundef) #2
142
159
0 commit comments