9
9
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
10
10
11
11
; CHECK-SPIRV-DAG: Capability CooperativeMatrixKHR
12
+ ; CHECK-SPIRV-DAG: Capability CooperativeMatrixCheckedInstructionsINTEL
12
13
; CHECK-SPIRV-DAG: Extension "SPV_KHR_cooperative_matrix"
13
14
; CHECK-SPIRV-DAG: Extension "SPV_INTEL_joint_matrix"
14
15
; CHECK-SPIRV-DAG: TypeInt [[#Int8Ty:]] 8 0
30
31
; CHECK-SPIRV: CooperativeMatrixMulAddKHR [[#MatTy1]]
31
32
; CHECK-SPIRV: CooperativeMatrixStoreCheckedINTEL
32
33
33
- ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2) @_Z46__spirv_CooperativeMatrixConstructCheckedINTELiilli (i32 4, i32 4, i64 12, i64 12, i32 %_arg_Initvalue)
34
- ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 3, 12, 48, 0) @_Z41__spirv_CooperativeMatrixLoadCheckedINTELPU3AS4ciiillli (ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i32 0, i32 0, i32 0, i64 12, i64 48, i64 %_arg_K, i32 1)
34
+ ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2) @_Z46__spirv_CooperativeMatrixConstructCheckedINTELiiiii (i32 4, i32 4, i32 12, i32 12, i32 %_arg_Initvalue)
35
+ ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 3, 12, 48, 0) @_Z95__spirv_CooperativeMatrixLoadCheckedINTEL_RPU3AS144__spirv_CooperativeMatrixKHR__char_3_12_48_0PU3AS4ciiiiili (ptr addrspace(4) %[[MatrixPtr:[%0-9a-z.]+]], i32 0, i32 0, i32 0, i32 12, i32 48, i64 %_arg_K, i32 1)
35
36
; CHECK-LLVM: call spir_func i32 @_Z34__spirv_CooperativeMatrixLengthKHRPU3AS144__spirv_CooperativeMatrixKHR__char_3_12_48_0(target("spirv.CooperativeMatrixKHR", i8, 3, 12, 48, 0)
36
- ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 2, 48, 12, 1) @_Z41__spirv_CooperativeMatrixLoadCheckedINTELPU3AS4ciiilll
37
+ ; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 2, 48, 12, 1) @_Z95__spirv_CooperativeMatrixLoadCheckedINTEL_RPU3AS144__spirv_CooperativeMatrixKHR__char_2_48_12_1PU3AS4ciiiiil
37
38
; 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)
38
- ; CHECK-LLVM: call spir_func void @_Z42__spirv_CooperativeMatrixStoreCheckedINTELPU3AS4iiiPU3AS144__spirv_CooperativeMatrixKHR__uint_3_12_12_2illli (ptr addrspace(4) %{{.*}}, i32 0, i32 0, target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2)
39
+ ; CHECK-LLVM: call spir_func void @_Z42__spirv_CooperativeMatrixStoreCheckedINTELPU3AS4iiiPU3AS144__spirv_CooperativeMatrixKHR__uint_3_12_12_2iiili (ptr addrspace(4) %{{.*}}, i32 0, i32 0, target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 2)
39
40
40
41
; ModuleID = 'test-matrix-opaque.bc'
41
42
source_filename = "matrix-int8-test.cpp"
77
78
%cmp.i58.i = icmp ult i64 %5 , 2147483648
78
79
%sub5.i = sub nsw i64 %2 , %5
79
80
call void @llvm.lifetime.start.p0 (i64 8 , ptr nonnull %sub_c.sroa.0.i )
80
- %call.i.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z46__spirv_CooperativeMatrixConstructCheckedINTEL (i32 noundef 4 , i32 noundef 4 , i64 noundef 12 , i64 noundef 12 , i32 noundef %_arg_Initvalue ) #4
81
+ %call.i.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z46__spirv_CooperativeMatrixConstructCheckedINTEL (i32 noundef 4 , i32 noundef 4 , i32 noundef 12 , i32 noundef 12 , i32 noundef %_arg_Initvalue ) #4
81
82
store target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) %call.i.i , ptr %sub_c.sroa.0.i , align 8
82
83
%mul.i = mul nsw i64 %sub.i , 12
83
84
%div2452.i = lshr i64 %sub5.i , 4
@@ -102,14 +103,14 @@ for.body.i: ; preds = %for.cond.i
102
103
%conv13.i = zext i32 %mul12.i to i64
103
104
%add.ptr.i96.i = getelementptr inbounds i8 , ptr addrspace (1 ) %add.ptr.i93.i , i64 %conv13.i
104
105
%call.ascast.i66.i = addrspacecast ptr addrspace (1 ) %add.ptr.i96.i to ptr addrspace (4 )
105
- %call1.i.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_1 (ptr addrspace (4 ) noundef %call.ascast.i66.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 0 , i64 noundef 12 , i64 noundef 48 , i64 noundef %_arg_K , i32 noundef 1 ) #4
106
+ %call1.i.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_1 (ptr addrspace (4 ) noundef %call.ascast.i66.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 0 , i32 noundef 12 , i32 noundef 48 , i64 noundef %_arg_K , i32 noundef 1 ) #4
106
107
%len = tail call spir_func noundef i32 @_Z34__spirv_CooperativeMatrixLengthKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) %call1.i.i )
107
108
%div20.i = mul nsw i32 %k.0.i , 12
108
109
%conv21.i = zext i32 %div20.i to i64
109
110
%mul23.i = mul i64 %mul22.i , %conv21.i
110
111
%add.ptr.i111.i = getelementptr i8 , ptr addrspace (1 ) %add.ptr.i108140.i , i64 %mul23.i
111
112
%call.ascast.i72.i = addrspacecast ptr addrspace (1 ) %add.ptr.i111.i to ptr addrspace (4 )
112
- %call1.i73.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_2 (ptr addrspace (4 ) noundef %call.ascast.i72.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 0 , i64 noundef 48 , i64 noundef 12 , i64 noundef %mul22.i ) #4
113
+ %call1.i73.i = tail call spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_2 (ptr addrspace (4 ) noundef %call.ascast.i72.i , i32 noundef 0 , i32 noundef 0 , i32 noundef 0 , i32 noundef 48 , i32 noundef 12 , i64 noundef %mul22.i ) #4
113
114
call void @llvm.lifetime.start.p0 (i64 8 , ptr nonnull %ref.tmp29.sroa.0.i )
114
115
%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
115
116
%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
@@ -127,27 +128,27 @@ _ZZZ15matrix_multiplyIiaLm24ELm96ELm24ELm96ELm24ELm24EEvR10big_matrixIT_XT5_EXT6
127
128
%add.ptr.i81.i = getelementptr inbounds i32 , ptr addrspace (1 ) %add.ptr.i.i , i64 %mul39.i
128
129
%call.ascast.i.i = addrspacecast ptr addrspace (1 ) %add.ptr.i81.i to ptr addrspace (4 )
129
130
%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..i = load target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ), ptr %sub_c.sroa.0.i , align 8
130
- tail call spir_func void @_Z42__spirv_CooperativeMatrixStoreCheckedINTEL (ptr addrspace (4 ) noundef %call.ascast.i.i , i32 noundef 0 , i32 noundef 0 , 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..i , i32 noundef 0 , i64 noundef 12 , i64 noundef 12 , i64 noundef %_arg_N , i32 noundef 1 ) #4
131
+ tail call spir_func void @_Z42__spirv_CooperativeMatrixStoreCheckedINTEL (ptr addrspace (4 ) noundef %call.ascast.i.i , i32 noundef 0 , i32 noundef 0 , 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..i , i32 noundef 0 , i32 noundef 12 , i32 noundef 12 , i64 noundef %_arg_N , i32 noundef 1 ) #4
131
132
call void @llvm.lifetime.end.p0 (i64 8 , ptr nonnull %sub_c.sroa.0.i )
132
133
ret void
133
134
}
134
135
135
136
; Function Attrs: convergent
136
- declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z46__spirv_CooperativeMatrixConstructCheckedINTEL (i32 noundef, i32 noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
137
+ declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) @_Z46__spirv_CooperativeMatrixConstructCheckedINTEL (i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2
137
138
138
139
declare dso_local spir_func noundef i32 @_Z34__spirv_CooperativeMatrixLengthKHR (target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) noundef)
139
140
140
141
; Function Attrs: convergent
141
- declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_1 (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
142
+ declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 3 , 12 , 48 , 0 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_1 (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
142
143
143
144
; Function Attrs: convergent
144
- declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_2 (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2
145
+ declare dso_local spir_func noundef target ("spirv.CooperativeMatrixKHR" , i8 , 2 , 48 , 12 , 1 ) @_Z41__spirv_CooperativeMatrixLoadCheckedINTEL_2 (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2
145
146
146
147
; Function Attrs: convergent
147
148
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
148
149
149
150
; Function Attrs: convergent
150
- declare dso_local spir_func void @_Z42__spirv_CooperativeMatrixStoreCheckedINTEL (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
151
+ declare dso_local spir_func void @_Z42__spirv_CooperativeMatrixStoreCheckedINTEL (ptr addrspace (4 ) noundef, i32 noundef, i32 noundef, target ("spirv.CooperativeMatrixKHR" , i32 , 3 , 12 , 12 , 2 ) noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2
151
152
152
153
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
153
154
declare void @llvm.lifetime.start.p0 (i64 immarg, ptr nocapture ) #3
0 commit comments