1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize64 -verify-machineinstrs < %s | FileCheck %s --check-prefix=W64
4 declare <4 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16(<16 x half>, <16 x half>, <4 x float>)
5 declare <4 x float> @llvm.amdgcn.wmma.f32.16x16x16.bf16(<16 x i16>, <16 x i16>, <4 x float>)
6 declare <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half>, <16 x half>, <8 x half>, i1 immarg)
7 declare <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.tied(<16 x half>, <16 x half>, <8 x half>, i1 immarg)
8 declare <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16>, <16 x i16>, <8 x i16>, i1 immarg)
9 declare <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.tied(<16 x i16>, <16 x i16>, <8 x i16>, i1 immarg)
10 declare <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 immarg, <4 x i32>, i1 immarg, <4 x i32>, <4 x i32>, i1 immarg)
11 declare <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 immarg, <2 x i32>, i1 immarg, <2 x i32>, <4 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, <4 x float> %C, ptr addrspace(1) %out) {
16 ; W64-LABEL: test_wmma_f32_16x16x16_f16:
18 ; W64-NEXT: v_wmma_f32_16x16x16_f16 v[16:19], v[0:7], v[8:15], v[16:19]
19 ; W64-NEXT: global_store_b128 v[20:21], v[16:19], off
22 %res = call <4 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16(<16 x half> %A, <16 x half> %B, <4 x float> %C)
23 store <4 x float> %res, ptr addrspace(1) %out, align 16
27 ; @llvm.amdgcn.wmma.f32.16x16x16.bf16
29 define amdgpu_ps void @test_wmma_f32_16x16x16_bf16(<16 x i16> %A, <16 x i16> %B, <4 x float> %C, ptr addrspace(1) %out) {
30 ; W64-LABEL: test_wmma_f32_16x16x16_bf16:
32 ; W64-NEXT: v_wmma_f32_16x16x16_bf16 v[16:19], v[0:7], v[8:15], v[16:19]
33 ; W64-NEXT: global_store_b128 v[20:21], v[16:19], off
36 %res = call <4 x float> @llvm.amdgcn.wmma.f32.16x16x16.bf16(<16 x i16> %A, <16 x i16> %B, <4 x float> %C)
37 store <4 x float> %res, ptr addrspace(1) %out, align 16
41 ; @llvm.amdgcn.wmma.f16.16x16x16.f16
43 define amdgpu_ps void @test_wmma_f16_16x16x16_f16_lo(<16 x half> %A, <16 x half> %B, <8 x half> %C, ptr addrspace(1) %out) {
44 ; W64-LABEL: test_wmma_f16_16x16x16_f16_lo:
46 ; W64-NEXT: v_wmma_f16_16x16x16_f16 v[16:19], v[0:7], v[8:15], v[16:19]
47 ; W64-NEXT: global_store_b128 v[20:21], v[16:19], off
50 %res = call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A, <16 x half> %B, <8 x half> %C, i1 0)
51 store <8 x half> %res, ptr addrspace(1) %out, align 16
55 define amdgpu_ps void @test_wmma_f16_16x16x16_f16_hi(<16 x half> %A, <16 x half> %B, <8 x half> %C, ptr addrspace(1) %out) {
56 ; W64-LABEL: test_wmma_f16_16x16x16_f16_hi:
58 ; W64-NEXT: v_wmma_f16_16x16x16_f16 v[16:19], v[0:7], v[8:15], v[16:19] op_sel:[0,0,1]
59 ; W64-NEXT: global_store_b128 v[20:21], v[16:19], off
62 %res = call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A, <16 x half> %B, <8 x half> %C, i1 1)
63 store <8 x half> %res, ptr addrspace(1) %out, align 16
67 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, <8 x half> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
68 ; W64-LABEL: test_wmma_f16_16x16x16_f16_untied:
70 ; W64-NEXT: v_wmma_f16_16x16x16_f16 v[40:43], v[0:7], v[8:15], v[32:35]
71 ; W64-NEXT: v_wmma_f16_16x16x16_f16 v[32:35], v[16:23], v[24:31], v[32:35]
72 ; W64-NEXT: global_store_b128 v[36:37], v[40:43], off
73 ; W64-NEXT: global_store_b128 v[38:39], v[32:35], off
76 %res.0 = call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A.0, <16 x half> %B.0, <8 x half> %C, i1 0)
77 %res.1 = call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16(<16 x half> %A.1, <16 x half> %B.1, <8 x half> %C, i1 0)
78 store <8 x half> %res.0, ptr addrspace(1) %out.0, align 32
79 store <8 x half> %res.1, ptr addrspace(1) %out.1, align 32
83 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, <8 x half> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
84 ; W64-LABEL: test_wmma_f16_16x16x16_f16_tied:
86 ; W64-NEXT: v_mov_b32_e32 v43, v35
87 ; W64-NEXT: v_mov_b32_e32 v42, v34
88 ; W64-NEXT: v_mov_b32_e32 v41, v33
89 ; W64-NEXT: v_mov_b32_e32 v40, v32
90 ; W64-NEXT: v_wmma_f16_16x16x16_f16 v[32:35], v[16:23], v[24:31], v[32:35]
91 ; W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
92 ; W64-NEXT: v_wmma_f16_16x16x16_f16 v[40:43], v[0:7], v[8:15], v[40:43]
93 ; W64-NEXT: global_store_b128 v[36:37], v[40:43], off
94 ; W64-NEXT: global_store_b128 v[38:39], v[32:35], off
97 %res.0 = call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.tied(<16 x half> %A.0, <16 x half> %B.0, <8 x half> %C, i1 0)
98 %res.1 = call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.tied(<16 x half> %A.1, <16 x half> %B.1, <8 x half> %C, i1 0)
99 store <8 x half> %res.0, ptr addrspace(1) %out.0, align 32
100 store <8 x half> %res.1, ptr addrspace(1) %out.1, align 32
104 ; @llvm.amdgcn.wmma.bf16.16x16x16.bf16
106 define amdgpu_ps void @test_wmma_bf16_16x16x16_bf16_lo(<16 x i16> %A, <16 x i16> %B, <8 x i16> %C, ptr addrspace(1) %out) {
107 ; W64-LABEL: test_wmma_bf16_16x16x16_bf16_lo:
108 ; W64: ; %bb.0: ; %bb
109 ; W64-NEXT: v_wmma_bf16_16x16x16_bf16 v[16:19], v[0:7], v[8:15], v[16:19]
110 ; W64-NEXT: global_store_b128 v[20:21], v[16:19], off
113 %res = call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A, <16 x i16> %B, <8 x i16> %C, i1 0)
114 store <8 x i16> %res, ptr addrspace(1) %out, align 16
118 define amdgpu_ps void @test_wmma_bf16_16x16x16_bf16_hi(<16 x i16> %A, <16 x i16> %B, <8 x i16> %C, ptr addrspace(1) %out) {
119 ; W64-LABEL: test_wmma_bf16_16x16x16_bf16_hi:
120 ; W64: ; %bb.0: ; %bb
121 ; W64-NEXT: v_wmma_bf16_16x16x16_bf16 v[16:19], v[0:7], v[8:15], v[16:19] op_sel:[0,0,1]
122 ; W64-NEXT: global_store_b128 v[20:21], v[16:19], off
125 %res = call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A, <16 x i16> %B, <8 x i16> %C, i1 1)
126 store <8 x i16> %res, ptr addrspace(1) %out, align 16
130 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, <8 x i16> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
131 ; W64-LABEL: test_wmma_bf16_16x16x16_bf16_untied:
132 ; W64: ; %bb.0: ; %bb
133 ; W64-NEXT: v_wmma_bf16_16x16x16_bf16 v[40:43], v[0:7], v[8:15], v[32:35]
134 ; W64-NEXT: v_wmma_bf16_16x16x16_bf16 v[32:35], v[16:23], v[24:31], v[32:35]
135 ; W64-NEXT: global_store_b128 v[36:37], v[40:43], off
136 ; W64-NEXT: global_store_b128 v[38:39], v[32:35], off
139 %res.0 = call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A.0, <16 x i16> %B.0, <8 x i16> %C, i1 0)
140 %res.1 = call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16(<16 x i16> %A.1, <16 x i16> %B.1, <8 x i16> %C, i1 0)
141 store <8 x i16> %res.0, ptr addrspace(1) %out.0, align 32
142 store <8 x i16> %res.1, ptr addrspace(1) %out.1, align 32
146 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, <8 x i16> %C, ptr addrspace(1) %out.0, ptr addrspace(1) %out.1) {
147 ; W64-LABEL: test_wmma_bf16_16x16x16_bf16_tied:
148 ; W64: ; %bb.0: ; %bb
149 ; W64-NEXT: v_mov_b32_e32 v43, v35
150 ; W64-NEXT: v_mov_b32_e32 v42, v34
151 ; W64-NEXT: v_mov_b32_e32 v41, v33
152 ; W64-NEXT: v_mov_b32_e32 v40, v32
153 ; W64-NEXT: v_wmma_bf16_16x16x16_bf16 v[32:35], v[16:23], v[24:31], v[32:35]
154 ; W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
155 ; W64-NEXT: v_wmma_bf16_16x16x16_bf16 v[40:43], v[0:7], v[8:15], v[40:43]
156 ; W64-NEXT: global_store_b128 v[36:37], v[40:43], off
157 ; W64-NEXT: global_store_b128 v[38:39], v[32:35], off
160 %res.0 = call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.tied(<16 x i16> %A.0, <16 x i16> %B.0, <8 x i16> %C, i1 0)
161 %res.1 = call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.tied(<16 x i16> %A.1, <16 x i16> %B.1, <8 x i16> %C, i1 0)
162 store <8 x i16> %res.0, ptr addrspace(1) %out.0, align 32
163 store <8 x i16> %res.1, ptr addrspace(1) %out.1, align 32
167 ; @llvm.amdgcn.wmma.i32.16x16x16.iu8
169 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_unsigned(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
170 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_unsigned:
171 ; W64: ; %bb.0: ; %bb
172 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11]
173 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
176 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 0, <4 x i32> %B, <4 x i32> %C, i1 0)
177 store <4 x i32> %res, ptr addrspace(1) %out, align 16
182 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_signed(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
183 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_signed:
184 ; W64: ; %bb.0: ; %bb
185 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] neg_lo:[0,1,0]
186 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
189 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 1, <4 x i32> %B, <4 x i32> %C, i1 0)
190 store <4 x i32> %res, ptr addrspace(1) %out, align 16
194 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_unsigned(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
195 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_signed_unsigned:
196 ; W64: ; %bb.0: ; %bb
197 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] neg_lo:[1,0,0]
198 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
201 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 0, <4 x i32> %B, <4 x i32> %C, i1 0)
202 store <4 x i32> %res, ptr addrspace(1) %out, align 16
206 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_signed(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
207 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_signed_signed:
208 ; W64: ; %bb.0: ; %bb
209 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] neg_lo:[1,1,0]
210 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
213 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 1, <4 x i32> %B, <4 x i32> %C, i1 0)
214 store <4 x i32> %res, ptr addrspace(1) %out, align 16
218 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_unsigned_clamp(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
219 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_unsigned_clamp:
220 ; W64: ; %bb.0: ; %bb
221 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] clamp
222 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
225 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 0, <4 x i32> %B, <4 x i32> %C, i1 1)
226 store <4 x i32> %res, ptr addrspace(1) %out, align 16
230 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_unsigned_signed_clamp(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
231 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_unsigned_signed_clamp:
232 ; W64: ; %bb.0: ; %bb
233 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] neg_lo:[0,1,0] clamp
234 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
237 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 0, <4 x i32> %A, i1 1, <4 x i32> %B, <4 x i32> %C, i1 1)
238 store <4 x i32> %res, ptr addrspace(1) %out, align 16
242 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_unsigned_clamp(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
243 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_signed_unsigned_clamp:
244 ; W64: ; %bb.0: ; %bb
245 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] neg_lo:[1,0,0] clamp
246 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
249 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 0, <4 x i32> %B, <4 x i32> %C, i1 1)
250 store <4 x i32> %res, ptr addrspace(1) %out, align 16
254 define amdgpu_ps void @test_wmma_i32_16x16x16_ui8_signed_signed_clamp(<4 x i32> %A, <4 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
255 ; W64-LABEL: test_wmma_i32_16x16x16_ui8_signed_signed_clamp:
256 ; W64: ; %bb.0: ; %bb
257 ; W64-NEXT: v_wmma_i32_16x16x16_iu8 v[8:11], v[0:3], v[4:7], v[8:11] neg_lo:[1,1,0] clamp
258 ; W64-NEXT: global_store_b128 v[12:13], v[8:11], off
261 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8(i1 1, <4 x i32> %A, i1 1, <4 x i32> %B, <4 x i32> %C, i1 1)
262 store <4 x i32> %res, ptr addrspace(1) %out, align 16
266 ; @llvm.amdgcn.wmma.i32.16x16x16.iu4
268 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_unsigned(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
269 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_unsigned:
270 ; W64: ; %bb.0: ; %bb
271 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7]
272 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
275 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 0, <2 x i32> %B, <4 x i32> %C, i1 0)
276 store <4 x i32> %res, ptr addrspace(1) %out, align 16
280 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_signed(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
281 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_signed:
282 ; W64: ; %bb.0: ; %bb
283 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] neg_lo:[0,1,0]
284 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
287 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 1, <2 x i32> %B, <4 x i32> %C, i1 0)
288 store <4 x i32> %res, ptr addrspace(1) %out, align 16
292 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_unsigned(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
293 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_signed_unsigned:
294 ; W64: ; %bb.0: ; %bb
295 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] neg_lo:[1,0,0]
296 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
299 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 0, <2 x i32> %B, <4 x i32> %C, i1 0)
300 store <4 x i32> %res, ptr addrspace(1) %out, align 16
304 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_signed(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
305 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_signed_signed:
306 ; W64: ; %bb.0: ; %bb
307 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] neg_lo:[1,1,0]
308 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
311 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 1, <2 x i32> %B, <4 x i32> %C, i1 0)
312 store <4 x i32> %res, ptr addrspace(1) %out, align 16
316 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_unsigned_clamp(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
317 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_unsigned_clamp:
318 ; W64: ; %bb.0: ; %bb
319 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] clamp
320 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
323 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 0, <2 x i32> %B, <4 x i32> %C, i1 1)
324 store <4 x i32> %res, ptr addrspace(1) %out, align 16
328 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_unsigned_signed_clamp(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
329 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_unsigned_signed_clamp:
330 ; W64: ; %bb.0: ; %bb
331 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] neg_lo:[0,1,0] clamp
332 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
335 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 0, <2 x i32> %A, i1 1, <2 x i32> %B, <4 x i32> %C, i1 1)
336 store <4 x i32> %res, ptr addrspace(1) %out, align 16
340 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_unsigned_clamp(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
341 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_signed_unsigned_clamp:
342 ; W64: ; %bb.0: ; %bb
343 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] neg_lo:[1,0,0] clamp
344 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
347 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 0, <2 x i32> %B, <4 x i32> %C, i1 1)
348 store <4 x i32> %res, ptr addrspace(1) %out, align 16
352 define amdgpu_ps void @test_wmma_i32_16x16x16_ui4_signed_signed_clamp(<2 x i32> %A, <2 x i32> %B, <4 x i32> %C, ptr addrspace(1) %out) {
353 ; W64-LABEL: test_wmma_i32_16x16x16_ui4_signed_signed_clamp:
354 ; W64: ; %bb.0: ; %bb
355 ; W64-NEXT: v_wmma_i32_16x16x16_iu4 v[4:7], v[0:1], v[2:3], v[4:7] neg_lo:[1,1,0] clamp
356 ; W64-NEXT: global_store_b128 v[8:9], v[4:7], off
359 %res = call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4(i1 1, <2 x i32> %A, i1 1, <2 x i32> %B, <4 x i32> %C, i1 1)
360 store <4 x i32> %res, ptr addrspace(1) %out, align 16