1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize32,-wavefrontsize64 -verify-machineinstrs < %s | FileCheck %s --check-prefix=W32
4 declare <8 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16(<16 x half>, <16 x half> , <8 x float>)
5 declare <8 x float> @llvm.amdgcn.wmma.f32.16x16x16.bf16(<16 x i16>, <16 x i16> , <8 x float>)
6 declare <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half>, <16 x half> , <16 x half>, i1 immarg)
7 declare <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.tied(<16 x half>, <16 x half> , <16 x half>, i1 immarg)
8 declare <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16>, <16 x i16> , <16 x i16>, i1 immarg)
9 declare <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.tied(<16 x i16>, <16 x i16> , <16 x i16>, i1 immarg)
10 declare <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 immarg, <4 x i32>, i1 immarg, <4 x i32> , <8 x i32>, i1 immarg)
11 declare <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 immarg, <2 x i32>, i1 immarg, <2 x i32> , <8 x i32>, i1 immarg)
13 ; @llvm.amdgcn.wmma.f32.16x16x16.f16
15 define amdgpu_ps void @test_wmma_f32_16x16x16_f16(<16 x half> %A, <16 x half> %B, <8 x float> %C, ptr addrspace(1) %out) {
16 ; W32-LABEL: test_wmma_f32_16x16x16_f16:
18 ; W32-NEXT: v_wmma_f32_16x16x16_f16 v[16:23], v[0:7], v[8:15], v[16:23]
19 ; W32-NEXT: s_clause 0x1
20 ; W32-NEXT: global_store_b128 v[24:25], v[20:23], off offset:16
21 ; W32-NEXT: global_store_b128 v[24:25], v[16:19], off
23 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
26 %res = call <8 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16(<16 x half> %A, <16 x half> %B, <8 x float> %C)
27 store <8 x float> %res, ptr addrspace(1) %out, align 32
31 ; @llvm.amdgcn.wmma.f32.16x16x16.bf16
33 define amdgpu_ps void @test_wmma_f32_16x16x16_bf16(<16 x i16> %A, <16 x i16> %B, <8 x float> %C, ptr addrspace(1) %out) {
34 ; W32-LABEL: test_wmma_f32_16x16x16_bf16:
36 ; W32-NEXT: v_wmma_f32_16x16x16_bf16 v[16:23], v[0:7], v[8:15], v[16:23]
37 ; W32-NEXT: s_clause 0x1
38 ; W32-NEXT: global_store_b128 v[24:25], v[20:23], off offset:16
39 ; W32-NEXT: global_store_b128 v[24:25], v[16:19], off
41 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
44 %res = call <8 x float> @llvm.amdgcn.wmma.f32.16x16x16.bf16(<16 x i16> %A, <16 x i16> %B, <8 x float> %C)
45 store <8 x float> %res, ptr addrspace(1) %out, align 32
49 ; @llvm.amdgcn.wmma.f16.16x16x16.f16
51 define amdgpu_ps void @test_wmma_f16_16x16x16_f16_lo(<16 x half> %A, <16 x half> %B, <16 x half> %C, ptr addrspace(1) %out) {
52 ; W32-LABEL: test_wmma_f16_16x16x16_f16_lo:
54 ; W32-NEXT: v_wmma_f16_16x16x16_f16 v[16:23], v[0:7], v[8:15], v[16:23]
55 ; W32-NEXT: s_clause 0x1
56 ; W32-NEXT: global_store_b128 v[24:25], v[20:23], off offset:16
57 ; W32-NEXT: global_store_b128 v[24:25], v[16:19], off
59 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
62 %res = call <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A, <16 x half> %B, <16 x half> %C, i1 0)
63 store <16 x half> %res, ptr addrspace(1) %out, align 32
67 define amdgpu_ps void @test_wmma_f16_16x16x16_f16_hi(<16 x half> %A, <16 x half> %B, <16 x half> %C, ptr addrspace(1) %out) {
68 ; W32-LABEL: test_wmma_f16_16x16x16_f16_hi:
70 ; W32-NEXT: v_wmma_f16_16x16x16_f16 v[16:23], v[0:7], v[8:15], v[16:23] op_sel:[0,0,1]
71 ; W32-NEXT: s_clause 0x1
72 ; W32-NEXT: global_store_b128 v[24:25], v[20:23], off offset:16
73 ; W32-NEXT: global_store_b128 v[24:25], v[16:19], off
75 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
78 %res = call <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A, <16 x half> %B, <16 x half> %C, i1 1)
79 store <16 x half> %res, ptr addrspace(1) %out, align 32
83 define amdgpu_ps void @test_wmma_f16_16x16x16_f16_untied(<16 x half> %A.0, <16 x half> %B.0, <16 x half> %A.1, <16 x half> %B.1, <16 x half> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
84 ; W32-LABEL: test_wmma_f16_16x16x16_f16_untied:
86 ; W32-NEXT: v_wmma_f16_16x16x16_f16 v[44:51], v[0:7], v[8:15], v[32:39]
87 ; W32-NEXT: v_wmma_f16_16x16x16_f16 v[32:39], v[16:23], v[24:31], v[32:39]
88 ; W32-NEXT: s_clause 0x1
89 ; W32-NEXT: global_store_b128 v[40:41], v[48:51], off offset:16
90 ; W32-NEXT: global_store_b128 v[40:41], v[44:47], off
91 ; W32-NEXT: s_clause 0x1
92 ; W32-NEXT: global_store_b128 v[42:43], v[36:39], off offset:16
93 ; W32-NEXT: global_store_b128 v[42:43], v[32:35], off
95 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
98 %res.0 = call <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A.0, <16 x half> %B.0, <16 x half> %C, i1 0)
99 %res.1 = call <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A.1, <16 x half> %B.1, <16 x half> %C, i1 0)
100 store <16 x half> %res.0, ptr addrspace(1) %out.0, align 32
101 store <16 x half> %res.1, ptr addrspace(1) %out.1, align 32
105 define amdgpu_ps void @test_wmma_f16_16x16x16_f16_tied(<16 x half> %A.0, <16 x half> %B.0, <16 x half> %A.1, <16 x half> %B.1, <16 x half> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
106 ; W32-LABEL: test_wmma_f16_16x16x16_f16_tied:
107 ; W32: ; %bb.0: ; %bb
108 ; W32-NEXT: v_dual_mov_b32 v51, v39 :: v_dual_mov_b32 v50, v38
109 ; W32-NEXT: v_dual_mov_b32 v49, v37 :: v_dual_mov_b32 v48, v36
110 ; W32-NEXT: v_dual_mov_b32 v47, v35 :: v_dual_mov_b32 v46, v34
111 ; W32-NEXT: v_dual_mov_b32 v45, v33 :: v_dual_mov_b32 v44, v32
112 ; W32-NEXT: v_wmma_f16_16x16x16_f16 v[32:39], v[16:23], v[24:31], v[32:39]
113 ; W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
114 ; W32-NEXT: v_wmma_f16_16x16x16_f16 v[44:51], v[0:7], v[8:15], v[44:51]
115 ; W32-NEXT: s_clause 0x1
116 ; W32-NEXT: global_store_b128 v[40:41], v[48:51], off offset:16
117 ; W32-NEXT: global_store_b128 v[40:41], v[44:47], off
118 ; W32-NEXT: s_clause 0x1
119 ; W32-NEXT: global_store_b128 v[42:43], v[36:39], off offset:16
120 ; W32-NEXT: global_store_b128 v[42:43], v[32:35], off
122 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
125 %res.0 = call <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.tied(<16 x half> %A.0, <16 x half> %B.0, <16 x half> %C, i1 0)
126 %res.1 = call <16 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.tied(<16 x half> %A.1, <16 x half> %B.1, <16 x half> %C, i1 0)
127 store <16 x half> %res.0, ptr addrspace(1) %out.0, align 32
128 store <16 x half> %res.1, ptr addrspace(1) %out.1, align 32
132 ; @llvm.amdgcn.wmma.bf16.16x16x16.bf16
134 define amdgpu_ps void @test_wmma_bf16_16x16x16_bf16_lo(<16 x i16> %A, <16 x i16> %B, <16 x i16> %C, ptr addrspace(1) %out) {
135 ; W32-LABEL: test_wmma_bf16_16x16x16_bf16_lo:
136 ; W32: ; %bb.0: ; %bb
137 ; W32-NEXT: v_wmma_bf16_16x16x16_bf16 v[16:23], v[0:7], v[8:15], v[16:23]
138 ; W32-NEXT: s_clause 0x1
139 ; W32-NEXT: global_store_b128 v[24:25], v[20:23], off offset:16
140 ; W32-NEXT: global_store_b128 v[24:25], v[16:19], off
142 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
145 %res = call <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A, <16 x i16> %B, <16 x i16> %C, i1 0)
146 store <16 x i16> %res, ptr addrspace(1) %out, align 32
150 define amdgpu_ps void @test_wmma_bf16_16x16x16_bf16_hi(<16 x i16> %A, <16 x i16> %B, <16 x i16> %C, ptr addrspace(1) %out) {
151 ; W32-LABEL: test_wmma_bf16_16x16x16_bf16_hi:
152 ; W32: ; %bb.0: ; %bb
153 ; W32-NEXT: v_wmma_bf16_16x16x16_bf16 v[16:23], v[0:7], v[8:15], v[16:23] op_sel:[0,0,1]
154 ; W32-NEXT: s_clause 0x1
155 ; W32-NEXT: global_store_b128 v[24:25], v[20:23], off offset:16
156 ; W32-NEXT: global_store_b128 v[24:25], v[16:19], off
158 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
161 %res = call <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A, <16 x i16> %B, <16 x i16> %C, i1 1)
162 store <16 x i16> %res, ptr addrspace(1) %out, align 32
166 define amdgpu_ps void @test_wmma_bf16_16x16x16_bf16_untied(<16 x i16> %A.0, <16 x i16> %B.0, <16 x i16> %A.1, <16 x i16> %B.1, <16 x i16> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
167 ; W32-LABEL: test_wmma_bf16_16x16x16_bf16_untied:
168 ; W32: ; %bb.0: ; %bb
169 ; W32-NEXT: v_wmma_bf16_16x16x16_bf16 v[44:51], v[0:7], v[8:15], v[32:39]
170 ; W32-NEXT: v_wmma_bf16_16x16x16_bf16 v[32:39], v[16:23], v[24:31], v[32:39]
171 ; W32-NEXT: s_clause 0x1
172 ; W32-NEXT: global_store_b128 v[40:41], v[48:51], off offset:16
173 ; W32-NEXT: global_store_b128 v[40:41], v[44:47], off
174 ; W32-NEXT: s_clause 0x1
175 ; W32-NEXT: global_store_b128 v[42:43], v[36:39], off offset:16
176 ; W32-NEXT: global_store_b128 v[42:43], v[32:35], off
178 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
181 %res.0 = call <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A.0, <16 x i16> %B.0, <16 x i16> %C, i1 0)
182 %res.1 = call <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A.1, <16 x i16> %B.1, <16 x i16> %C, i1 0)
183 store <16 x i16> %res.0, ptr addrspace(1) %out.0, align 32
184 store <16 x i16> %res.1, ptr addrspace(1) %out.1, align 32
188 define amdgpu_ps void @test_wmma_bf16_16x16x16_bf16_tied(<16 x i16> %A.0, <16 x i16> %B.0, <16 x i16> %A.1, <16 x i16> %B.1, <16 x i16> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
189 ; W32-LABEL: test_wmma_bf16_16x16x16_bf16_tied:
190 ; W32: ; %bb.0: ; %bb
191 ; W32-NEXT: v_dual_mov_b32 v51, v39 :: v_dual_mov_b32 v50, v38
192 ; W32-NEXT: v_dual_mov_b32 v49, v37 :: v_dual_mov_b32 v48, v36
193 ; W32-NEXT: v_dual_mov_b32 v47, v35 :: v_dual_mov_b32 v46, v34
194 ; W32-NEXT: v_dual_mov_b32 v45, v33 :: v_dual_mov_b32 v44, v32
195 ; W32-NEXT: v_wmma_bf16_16x16x16_bf16 v[32:39], v[16:23], v[24:31], v[32:39]
196 ; W32-NEXT: s_delay_alu instid0(VALU_DEP_2)
197 ; W32-NEXT: v_wmma_bf16_16x16x16_bf16 v[44:51], v[0:7], v[8:15], v[44:51]
198 ; W32-NEXT: s_clause 0x1
199 ; W32-NEXT: global_store_b128 v[40:41], v[48:51], off offset:16
200 ; W32-NEXT: global_store_b128 v[40:41], v[44:47], off
201 ; W32-NEXT: s_clause 0x1
202 ; W32-NEXT: global_store_b128 v[42:43], v[36:39], off offset:16
203 ; W32-NEXT: global_store_b128 v[42:43], v[32:35], off
205 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
208 %res.0 = call <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.tied(<16 x i16> %A.0, <16 x i16> %B.0, <16 x i16> %C, i1 0)
209 %res.1 = call <16 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.tied(<16 x i16> %A.1, <16 x i16> %B.1, <16 x i16> %C, i1 0)
210 store <16 x i16> %res.0, ptr addrspace(1) %out.0, align 32
211 store <16 x i16> %res.1, ptr addrspace(1) %out.1, align 32
215 ; @llvm.amdgcn.wmma.i32.16x16x16.iu8
217 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_unsigned(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
218 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_unsigned:
219 ; W32: ; %bb.0: ; %bb
220 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15]
221 ; W32-NEXT: s_clause 0x1
222 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
223 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
225 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
228 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 0, <4 x i32> %B, <8 x i32> %C, i1 0)
229 store <8 x i32> %res, ptr addrspace(1) %out, align 32
233 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_signed(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
234 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_signed:
235 ; W32: ; %bb.0: ; %bb
236 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] neg_lo:[0,1,0]
237 ; W32-NEXT: s_clause 0x1
238 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
239 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
241 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
244 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 1, <4 x i32> %B, <8 x i32> %C, i1 0)
245 store <8 x i32> %res, ptr addrspace(1) %out, align 32
249 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_unsigned(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
250 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_signed_unsigned:
251 ; W32: ; %bb.0: ; %bb
252 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] neg_lo:[1,0,0]
253 ; W32-NEXT: s_clause 0x1
254 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
255 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
257 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
260 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 0, <4 x i32> %B, <8 x i32> %C, i1 0)
261 store <8 x i32> %res, ptr addrspace(1) %out, align 32
265 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_signed(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
266 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_signed_signed:
267 ; W32: ; %bb.0: ; %bb
268 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] neg_lo:[1,1,0]
269 ; W32-NEXT: s_clause 0x1
270 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
271 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
273 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
276 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 1, <4 x i32> %B, <8 x i32> %C, i1 0)
277 store <8 x i32> %res, ptr addrspace(1) %out, align 32
281 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_unsigned_clamp(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
282 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_unsigned_clamp:
283 ; W32: ; %bb.0: ; %bb
284 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] clamp
285 ; W32-NEXT: s_clause 0x1
286 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
287 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
289 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
292 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 0, <4 x i32> %B, <8 x i32> %C, i1 1)
293 store <8 x i32> %res, ptr addrspace(1) %out, align 32
297 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_signed_clamp(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
298 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_signed_clamp:
299 ; W32: ; %bb.0: ; %bb
300 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] neg_lo:[0,1,0] clamp
301 ; W32-NEXT: s_clause 0x1
302 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
303 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
305 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
308 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 1, <4 x i32> %B, <8 x i32> %C, i1 1)
309 store <8 x i32> %res, ptr addrspace(1) %out, align 32
313 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_unsigned_clamp(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
314 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_signed_unsigned_clamp:
315 ; W32: ; %bb.0: ; %bb
316 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] neg_lo:[1,0,0] clamp
317 ; W32-NEXT: s_clause 0x1
318 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
319 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
321 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
324 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 0, <4 x i32> %B, <8 x i32> %C, i1 1)
325 store <8 x i32> %res, ptr addrspace(1) %out, align 32
329 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_signed_clamp(<4 x i32> %A, <4 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
330 ; W32-LABEL: test_wmma_i32_16x16x16_ui8_signed_signed_clamp:
331 ; W32: ; %bb.0: ; %bb
332 ; W32-NEXT: v_wmma_i32_16x16x16_iu8 v[8:15], v[0:3], v[4:7], v[8:15] neg_lo:[1,1,0] clamp
333 ; W32-NEXT: s_clause 0x1
334 ; W32-NEXT: global_store_b128 v[16:17], v[12:15], off offset:16
335 ; W32-NEXT: global_store_b128 v[16:17], v[8:11], off
337 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
340 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 1, <4 x i32> %B, <8 x i32> %C, i1 1)
341 store <8 x i32> %res, ptr addrspace(1) %out, align 32
345 ; @llvm.amdgcn.wmma.i32.16x16x16.iu4
347 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_unsigned(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
348 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_unsigned:
349 ; W32: ; %bb.0: ; %bb
350 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11]
351 ; W32-NEXT: s_clause 0x1
352 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
353 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
355 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
358 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 0, <2 x i32> %B, <8 x i32> %C, i1 0)
359 store <8 x i32> %res, ptr addrspace(1) %out, align 32
363 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_signed(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
364 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_signed:
365 ; W32: ; %bb.0: ; %bb
366 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] neg_lo:[0,1,0]
367 ; W32-NEXT: s_clause 0x1
368 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
369 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
371 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
374 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 1, <2 x i32> %B, <8 x i32> %C, i1 0)
375 store <8 x i32> %res, ptr addrspace(1) %out, align 32
379 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_unsigned(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
380 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_signed_unsigned:
381 ; W32: ; %bb.0: ; %bb
382 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] neg_lo:[1,0,0]
383 ; W32-NEXT: s_clause 0x1
384 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
385 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
387 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
390 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 0, <2 x i32> %B, <8 x i32> %C, i1 0)
391 store <8 x i32> %res, ptr addrspace(1) %out, align 32
395 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_signed(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
396 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_signed_signed:
397 ; W32: ; %bb.0: ; %bb
398 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] neg_lo:[1,1,0]
399 ; W32-NEXT: s_clause 0x1
400 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
401 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
403 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
406 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 1, <2 x i32> %B, <8 x i32> %C, i1 0)
407 store <8 x i32> %res, ptr addrspace(1) %out, align 32
412 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_unsigned_clamp(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
413 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_unsigned_clamp:
414 ; W32: ; %bb.0: ; %bb
415 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] clamp
416 ; W32-NEXT: s_clause 0x1
417 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
418 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
420 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
423 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 0, <2 x i32> %B, <8 x i32> %C, i1 1)
424 store <8 x i32> %res, ptr addrspace(1) %out, align 32
428 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_signed_clamp(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
429 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_signed_clamp:
430 ; W32: ; %bb.0: ; %bb
431 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] neg_lo:[0,1,0] clamp
432 ; W32-NEXT: s_clause 0x1
433 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
434 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
436 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
439 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 1, <2 x i32> %B, <8 x i32> %C, i1 1)
440 store <8 x i32> %res, ptr addrspace(1) %out, align 32
444 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_unsigned_clamp(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
445 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_signed_unsigned_clamp:
446 ; W32: ; %bb.0: ; %bb
447 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] neg_lo:[1,0,0] clamp
448 ; W32-NEXT: s_clause 0x1
449 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
450 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
452 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
455 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 0, <2 x i32> %B, <8 x i32> %C, i1 1)
456 store <8 x i32> %res, ptr addrspace(1) %out, align 32
460 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_signed_clamp(<2 x i32> %A, <2 x i32> %B, <8 x i32> %C, ptr addrspace(1) %out) {
461 ; W32-LABEL: test_wmma_i32_16x16x16_ui4_signed_signed_clamp:
462 ; W32: ; %bb.0: ; %bb
463 ; W32-NEXT: v_wmma_i32_16x16x16_iu4 v[4:11], v[0:1], v[2:3], v[4:11] neg_lo:[1,1,0] clamp
464 ; W32-NEXT: s_clause 0x1
465 ; W32-NEXT: global_store_b128 v[12:13], v[8:11], off offset:16
466 ; W32-NEXT: global_store_b128 v[12:13], v[4:7], off
468 ; W32-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
471 %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 1, <2 x i32> %B, <8 x i32> %C, i1 1)
472 store <8 x i32> %res, ptr addrspace(1) %out, align 32