2121; CHECK-SPIRV-DAG: Constant [[#Int32Ty]] [[#Const2:]] 2
2222; CHECK-SPIRV-DAG: Constant [[#Int32Ty]] [[#Const1:]] 1
2323; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy1:]] [[#Int32Ty]] [[#Const3]] [[#Const12]] [[#Const12]] [[#Const2]]
24- ; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy2:]] [[#Int8Ty]] [[#Const0 ]] [[#Const12]] [[#Const48]] [[#Const0]]
24+ ; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy2:]] [[#Int8Ty]] [[#Const3 ]] [[#Const12]] [[#Const48]] [[#Const0]]
2525; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy3:]] [[#Int8Ty]] [[#Const2]] [[#Const48]] [[#Const12]] [[#Const1]]
2626; CHECK-SPIRV: CompositeConstruct [[#MatTy1]]
2727; CHECK-SPIRV: CooperativeMatrixLoadKHR [[#MatTy2]] [[#Load1:]]
3232; CHECK-SPIRV: CooperativeMatrixMulAddKHR [[#MatTy1]]
3333; CHECK-SPIRV: CooperativeMatrixStoreKHR
3434
35-
3635; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructi(i32 0)
37- ; CHECK-LLVM: call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTELPU3AS4ciiiiil(ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i32 0, i32 0, i32 1, i32 1, i32 0, i64 %_arg_K)
38- ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 0, 12, 48, 0) @_Z86__spirv_CooperativeMatrixLoadKHR_RPU3AS144__spirv_CooperativeMatrixKHR__char_0_12_48_0PU3AS4clii(ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i64 %_arg_K, i32 0, i32 1)
39- ; CHECK-LLVM: call spir_func i32 @_Z34__spirv_CooperativeMatrixLengthKHRPU3AS144__spirv_CooperativeMatrixKHR__char_0_12_48_0(target("spirv.CooperativeMatrixKHR", i8, 0, 12, 48, 0)
40- ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 2, 48, 12, 1) @_Z86__spirv_CooperativeMatrixLoadKHR_RPU3AS144__spirv_CooperativeMatrixKHR__char_2_48_12_1PU3AS4cl
41- ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2) @_Z34__spirv_CooperativeMatrixMulAddKHRPU3AS144__spirv_CooperativeMatrixKHR__char_0_12_48_0PU3AS144__spirv_CooperativeMatrixKHR__char_2_48_12_1PU3AS144__spirv_CooperativeMatrixKHR__uint_3_12_12_2i(target("spirv.CooperativeMatrixKHR", i8, 0, 12, 48, 0) %{{.*}}, target("spirv.CooperativeMatrixKHR", i8, 2, 48, 12, 1) %{{.*}}, target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2)
36+ ; CHECK-LLVM: call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTELPU3AS4ciiiiiil(ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i32 0, i32 0, i32 12, i32 48, i32 0, i32 0, i64 %_arg_K)
37+ ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 3, 12, 48, 0) @_Z86__spirv_CooperativeMatrixLoadKHR_RPU3AS144__spirv_CooperativeMatrixKHR__char_3_12_48_0PU3AS4cili(ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i32 0, i64 %_arg_K, i32 1)
38+ ; CHECK-LLVM: call spir_func i32 @_Z34__spirv_CooperativeMatrixLengthKHRPU3AS144__spirv_CooperativeMatrixKHR__char_3_12_48_0(target("spirv.CooperativeMatrixKHR", i8, 3, 12, 48, 0)
39+ ; CHECK-LLVM: call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTELPU3AS4ciiiiiil(ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i32 0, i32 0, i32 12, i32 48, i32 0, i32 0, i64 %mul22.i)
40+ ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 2, 48, 12, 1) @_Z86__spirv_CooperativeMatrixLoadKHR_RPU3AS144__spirv_CooperativeMatrixKHR__char_2_48_12_1PU3AS4cil
41+ ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2) @_Z34__spirv_CooperativeMatrixMulAddKHRPU3AS144__spirv_CooperativeMatrixKHR__char_3_12_48_0PU3AS144__spirv_CooperativeMatrixKHR__char_2_48_12_1PU3AS144__spirv_CooperativeMatrixKHR__uint_3_12_12_2i(target("spirv.CooperativeMatrixKHR", i8, 3, 12, 48, 0) %{{.*}}, target("spirv.CooperativeMatrixKHR", i8, 2, 48, 12, 1) %{{.*}}, target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2)
4242; CHECK-LLVM: call spir_func void @_Z33__spirv_CooperativeMatrixStoreKHRPU3AS4iPU3AS144__spirv_CooperativeMatrixKHR__uint_3_12_12_2ili(ptr addrspace(4) %{{.*}}, target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2)
4343
4444; ModuleID = 'test-matrix-opaque.bc'
@@ -106,19 +106,19 @@ for.body.i: ; preds = %for.cond.i
106106 %conv13.i = zext i32 %mul12.i to i64
107107 %add.ptr.i96.i = getelementptr inbounds i8 , ptr addrspace (1 ) %add.ptr.i93.i , i64 %conv13.i
108108 %call.ascast.i66.i = addrspacecast ptr addrspace (1 ) %add.ptr.i96.i to ptr addrspace (4 )
109- tail call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTEL (ptr addrspace (4 ) noundef %call.ascast.i66.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 1 , i32 noundef 1 , i32 noundef 0 , i64 noundef %_arg_K ) # 4
110- %call1.i.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 0 , 12 , 48 , 0 ) @_Z32__spirv_CooperativeMatrixLoadKHR_1 (ptr addrspace (4 ) noundef %call.ascast.i66.i , i64 noundef %_arg_K , i32 noundef 0 , i32 noundef 1 ) #4
111- %len = tail call spir_func noundef i32 @_Z34__spirv_CooperativeMatrixLengthKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 0 , 12 , 48 , 0 ) %call1.i.i )
109+ tail call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTEL (ptr addrspace (4 ) noundef %call.ascast.i66.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 12 , i32 noundef 48 , i32 noundef 0 , i32 noundef 0 , i64 noundef %_arg_K )
110+ %call1.i.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) @_Z32__spirv_CooperativeMatrixLoadKHR_1 (ptr addrspace (4 ) noundef %call.ascast.i66.i , i32 noundef 0 , i64 noundef %_arg_K , i32 noundef 1 ) #4
111+ %len = tail call spir_func noundef i32 @_Z34__spirv_CooperativeMatrixLengthKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) %call1.i.i )
112112 %div20.i = mul nsw i32 %k.0.i , 12
113113 %conv21.i = zext i32 %div20.i to i64
114114 %mul23.i = mul i64 %mul22.i , %conv21.i
115115 %add.ptr.i111.i = getelementptr i8 , ptr addrspace (1 ) %add.ptr.i108140.i , i64 %mul23.i
116116 %call.ascast.i72.i = addrspacecast ptr addrspace (1 ) %add.ptr.i111.i to ptr addrspace (4 )
117- tail call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTEL (ptr addrspace (4 ) noundef %call.ascast.i72.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 1 , i32 noundef 1 , i32 noundef 0 , i64 noundef %mul22.i ) # 4
118- %call1.i73.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z32__spirv_CooperativeMatrixLoadKHR_2 (ptr addrspace (4 ) noundef %call.ascast.i72.i , i64 noundef %mul22.i ) #4
117+ tail call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTEL (ptr addrspace (4 ) noundef %call.ascast.i72.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 12 , i32 noundef 48 , i32 noundef 0 , i32 noundef 0 , i64 noundef %mul22.i )
118+ %call1.i73.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z32__spirv_CooperativeMatrixLoadKHR_2 (ptr addrspace (4 ) noundef %call.ascast.i72.i , i32 noundef 0 , i64 noundef %mul22.i ) #4
119119 call void @llvm.lifetime.start.p0 (i64 8 , ptr nonnull %ref.tmp29.sroa.0.i )
120120 %sub_c.sroa.0.i.0.sub_c.sroa.0.i.0.sub_c.sroa.0.0.sub_c.sroa.0.0.sub_c.sroa.0.0.125.i = load target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ), ptr %sub_c.sroa.0.i , align 8
121- %call.i77.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z34__spirv_CooperativeMatrixMulAddKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 0 , 12 , 48 , 0 ) noundef %call1.i.i , target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) noundef %call1.i73.i , target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef %sub_c.sroa.0.i.0.sub_c.sroa.0.i.0.sub_c.sroa.0.0.sub_c.sroa.0.0.sub_c.sroa.0.0.125.i , i32 noundef 12 ) #4
121+ %call.i77.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z34__spirv_CooperativeMatrixMulAddKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) noundef %call1.i.i , target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) noundef %call1.i73.i , target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef %sub_c.sroa.0.i.0.sub_c.sroa.0.i.0.sub_c.sroa.0.0.sub_c.sroa.0.0.sub_c.sroa.0.0.125.i , i32 noundef 12 ) #4
122122 store target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) %call.i77.i , ptr %ref.tmp29.sroa.0.i , align 8
123123 %ref.tmp29.sroa.0.i.0.ref.tmp29.sroa.0.i.0.ref.tmp29.sroa.0.0.ref.tmp29.sroa.0.0.ref.tmp29.sroa.0.0..i = load i64 , ptr %ref.tmp29.sroa.0.i , align 8
124124 store i64 %ref.tmp29.sroa.0.i.0.ref.tmp29.sroa.0.i.0.ref.tmp29.sroa.0.0.ref.tmp29.sroa.0.0.ref.tmp29.sroa.0.0..i , ptr %sub_c.sroa.0.i , align 8
@@ -141,19 +141,19 @@ _ZZZ15matrix_multiplyIiaLm24ELm96ELm24ELm96ELm24ELm24EEvR10big_matrixIT_XT5_EXT6
141141; Function Attrs: convergent
142142declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z26__spirv_CompositeConstruct (i32 noundef) local_unnamed_addr #2
143143
144- declare dso_local spir_func noundef i32 @_Z34__spirv_CooperativeMatrixLengthKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 0 , 12 , 48 , 0 ) noundef)
144+ declare dso_local spir_func noundef i32 @_Z34__spirv_CooperativeMatrixLengthKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) noundef)
145145
146- ; Function Attrs: convergent
147- declare dso_local spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTEL (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2
146+ ; Function Attrs: convergent nounwind
147+ declare dso_local spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTEL (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2
148148
149149; Function Attrs: convergent
150- declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 0 , 12 , 48 , 0 ) @_Z32__spirv_CooperativeMatrixLoadKHR_1 (ptr addrspace (4 ) noundef, i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2
150+ declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) @_Z32__spirv_CooperativeMatrixLoadKHR_1 (ptr addrspace (4 ) noundef, i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
151151
152152; Function Attrs: convergent
153- declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z32__spirv_CooperativeMatrixLoadKHR_2 (ptr addrspace (4 ) noundef, i64 noundef) local_unnamed_addr #2
153+ declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z32__spirv_CooperativeMatrixLoadKHR_2 (ptr addrspace (4 ) noundef, i32 noundef, i64 noundef) local_unnamed_addr #2
154154
155155; Function Attrs: convergent
156- declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z34__spirv_CooperativeMatrixMulAddKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 0 , 12 , 48 , 0 ) noundef, target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) noundef, target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef, i32 noundef) local_unnamed_addr #2
156+ declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z34__spirv_CooperativeMatrixMulAddKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) noundef, target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) noundef, target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef, i32 noundef) local_unnamed_addr #2
157157
158158; Function Attrs: convergent
159159declare dso_local spir_func void @_Z33__spirv_CooperativeMatrixStoreKHR (ptr addrspace (4 ) noundef, target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef, i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
0 commit comments