1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass si-shrink-instructions -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=GFX10
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass si-shrink-instructions -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=GFX11
9 ; GFX10-LABEL: name: mad_cvv_f32
10 ; GFX10: $vgpr0 = IMPLICIT_DEF
11 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
12 ; GFX10-NEXT: $vgpr2 = V_MADMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
13 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
14 ; GFX11-LABEL: name: mad_cvv_f32
15 ; GFX11: $vgpr0 = IMPLICIT_DEF
16 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
17 ; GFX11-NEXT: $vgpr2 = V_MADMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
18 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
21 $vgpr2 = V_MAD_F32_e64 0, 1092616192, 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $mode, implicit $exec
22 SI_RETURN implicit $vgpr2
29 ; GFX10-LABEL: name: mad_vcv_f32
30 ; GFX10: $vgpr0 = IMPLICIT_DEF
31 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
32 ; GFX10-NEXT: $vgpr2 = V_MADMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
33 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
34 ; GFX11-LABEL: name: mad_vcv_f32
35 ; GFX11: $vgpr0 = IMPLICIT_DEF
36 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
37 ; GFX11-NEXT: $vgpr2 = V_MADMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
38 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
41 $vgpr2 = V_MAD_F32_e64 0, $vgpr0, 0, 1092616192, 0, $vgpr1, 0, 0, implicit $mode, implicit $exec
42 SI_RETURN implicit $vgpr2
49 ; GFX10-LABEL: name: mad_vvc_f32
50 ; GFX10: $vgpr0 = IMPLICIT_DEF
51 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
52 ; GFX10-NEXT: $vgpr2 = V_MADAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
53 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
54 ; GFX11-LABEL: name: mad_vvc_f32
55 ; GFX11: $vgpr0 = IMPLICIT_DEF
56 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
57 ; GFX11-NEXT: $vgpr2 = V_MADAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
58 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
61 $vgpr2 = V_MAD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1092616192, 0, 0, implicit $mode, implicit $exec
62 SI_RETURN implicit $vgpr2
69 ; GFX10-LABEL: name: mad_vsc_f32
70 ; GFX10: $vgpr0 = IMPLICIT_DEF
71 ; GFX10-NEXT: $sgpr1 = IMPLICIT_DEF
72 ; GFX10-NEXT: $vgpr2 = V_MADAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
73 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
74 ; GFX11-LABEL: name: mad_vsc_f32
75 ; GFX11: $vgpr0 = IMPLICIT_DEF
76 ; GFX11-NEXT: $sgpr1 = IMPLICIT_DEF
77 ; GFX11-NEXT: $vgpr2 = V_MADAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
78 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
81 $vgpr2 = V_MAD_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1092616192, 0, 0, implicit $mode, implicit $exec
82 SI_RETURN implicit $vgpr2
89 ; GFX10-LABEL: name: fma_cvv_f32
90 ; GFX10: $vgpr0 = IMPLICIT_DEF
91 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
92 ; GFX10-NEXT: $vgpr2 = V_FMAMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
93 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
94 ; GFX11-LABEL: name: fma_cvv_f32
95 ; GFX11: $vgpr0 = IMPLICIT_DEF
96 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
97 ; GFX11-NEXT: $vgpr2 = V_FMAMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
98 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
100 $vgpr1 = IMPLICIT_DEF
101 $vgpr2 = V_FMA_F32_e64 0, 1092616192, 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $mode, implicit $exec
102 SI_RETURN implicit $vgpr2
109 ; GFX10-LABEL: name: fma_vcv_f32
110 ; GFX10: $vgpr0 = IMPLICIT_DEF
111 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
112 ; GFX10-NEXT: $vgpr2 = V_FMAMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
113 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
114 ; GFX11-LABEL: name: fma_vcv_f32
115 ; GFX11: $vgpr0 = IMPLICIT_DEF
116 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
117 ; GFX11-NEXT: $vgpr2 = V_FMAMK_F32 $vgpr0, 1092616192, $vgpr1, implicit $mode, implicit $exec
118 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
119 $vgpr0 = IMPLICIT_DEF
120 $vgpr1 = IMPLICIT_DEF
121 $vgpr2 = V_FMA_F32_e64 0, $vgpr0, 0, 1092616192, 0, $vgpr1, 0, 0, implicit $mode, implicit $exec
122 SI_RETURN implicit $vgpr2
129 ; GFX10-LABEL: name: fma_vvc_f32
130 ; GFX10: $vgpr0 = IMPLICIT_DEF
131 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
132 ; GFX10-NEXT: $vgpr2 = V_FMAAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
133 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
134 ; GFX11-LABEL: name: fma_vvc_f32
135 ; GFX11: $vgpr0 = IMPLICIT_DEF
136 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
137 ; GFX11-NEXT: $vgpr2 = V_FMAAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
138 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
139 $vgpr0 = IMPLICIT_DEF
140 $vgpr1 = IMPLICIT_DEF
141 $vgpr2 = V_FMA_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1092616192, 0, 0, implicit $mode, implicit $exec
142 SI_RETURN implicit $vgpr2
149 ; GFX10-LABEL: name: fma_vsc_f32
150 ; GFX10: $vgpr0 = IMPLICIT_DEF
151 ; GFX10-NEXT: $sgpr1 = IMPLICIT_DEF
152 ; GFX10-NEXT: $vgpr2 = V_FMAAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
153 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
154 ; GFX11-LABEL: name: fma_vsc_f32
155 ; GFX11: $vgpr0 = IMPLICIT_DEF
156 ; GFX11-NEXT: $sgpr1 = IMPLICIT_DEF
157 ; GFX11-NEXT: $vgpr2 = V_FMAAK_F32 $vgpr0, $vgpr1, 1092616192, implicit $mode, implicit $exec
158 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
159 $vgpr0 = IMPLICIT_DEF
160 $sgpr1 = IMPLICIT_DEF
161 $vgpr2 = V_FMA_F32_e64 0, $vgpr0, 0, $vgpr1, 0, 1092616192, 0, 0, implicit $mode, implicit $exec
162 SI_RETURN implicit $vgpr2
169 ; GFX10-LABEL: name: mad_cvv_f16
170 ; GFX10: $vgpr0 = IMPLICIT_DEF
171 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
172 ; GFX10-NEXT: $vgpr2 = V_MADMK_F16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
173 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
174 ; GFX11-LABEL: name: mad_cvv_f16
175 ; GFX11: $vgpr0 = IMPLICIT_DEF
176 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
177 ; GFX11-NEXT: $vgpr2 = V_MADMK_F16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
178 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
179 $vgpr0 = IMPLICIT_DEF
180 $vgpr1 = IMPLICIT_DEF
181 $vgpr2 = V_MAD_F16_e64 0, 18688, 0, $vgpr0, 0, $vgpr1, 0, 0, implicit $mode, implicit $exec
182 SI_RETURN implicit $vgpr2
189 ; GFX10-LABEL: name: mad_vcv_f16
190 ; GFX10: $vgpr0 = IMPLICIT_DEF
191 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
192 ; GFX10-NEXT: $vgpr2 = V_MADMK_F16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
193 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
194 ; GFX11-LABEL: name: mad_vcv_f16
195 ; GFX11: $vgpr0 = IMPLICIT_DEF
196 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
197 ; GFX11-NEXT: $vgpr2 = V_MADMK_F16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
198 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
199 $vgpr0 = IMPLICIT_DEF
200 $vgpr1 = IMPLICIT_DEF
201 $vgpr2 = V_MAD_F16_e64 0, $vgpr0, 0, 18688, 0, $vgpr1, 0, 0, implicit $mode, implicit $exec
202 SI_RETURN implicit $vgpr2
209 ; GFX10-LABEL: name: mad_vvc_f16
210 ; GFX10: $vgpr0 = IMPLICIT_DEF
211 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
212 ; GFX10-NEXT: $vgpr2 = V_MADAK_F16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
213 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
214 ; GFX11-LABEL: name: mad_vvc_f16
215 ; GFX11: $vgpr0 = IMPLICIT_DEF
216 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
217 ; GFX11-NEXT: $vgpr2 = V_MADAK_F16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
218 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
219 $vgpr0 = IMPLICIT_DEF
220 $vgpr1 = IMPLICIT_DEF
221 $vgpr2 = V_MAD_F16_e64 0, $vgpr0, 0, $vgpr1, 0, 18688, 0, 0, implicit $mode, implicit $exec
222 SI_RETURN implicit $vgpr2
229 ; GFX10-LABEL: name: mad_vsc_f16
230 ; GFX10: $vgpr0 = IMPLICIT_DEF
231 ; GFX10-NEXT: $sgpr1 = IMPLICIT_DEF
232 ; GFX10-NEXT: $vgpr2 = V_MADAK_F16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
233 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
234 ; GFX11-LABEL: name: mad_vsc_f16
235 ; GFX11: $vgpr0 = IMPLICIT_DEF
236 ; GFX11-NEXT: $sgpr1 = IMPLICIT_DEF
237 ; GFX11-NEXT: $vgpr2 = V_MADAK_F16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
238 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
239 $vgpr0 = IMPLICIT_DEF
240 $sgpr1 = IMPLICIT_DEF
241 $vgpr2 = V_MAD_F16_e64 0, $vgpr0, 0, $vgpr1, 0, 18688, 0, 0, implicit $mode, implicit $exec
242 SI_RETURN implicit $vgpr2
249 ; GFX10-LABEL: name: fma_cvv_f16
250 ; GFX10: $vgpr0 = IMPLICIT_DEF
251 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
252 ; GFX10-NEXT: $vgpr2 = V_FMAMK_F16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
253 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
254 ; GFX11-LABEL: name: fma_cvv_f16
255 ; GFX11: $vgpr0 = IMPLICIT_DEF
256 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
257 ; GFX11-NEXT: $vgpr2 = V_FMAMK_F16_t16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
258 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
259 $vgpr0 = IMPLICIT_DEF
260 $vgpr1 = IMPLICIT_DEF
261 $vgpr2 = V_FMA_F16_gfx9_e64 0, 18688, 0, $vgpr0, 0, $vgpr1, 0, 0, 0, implicit $mode, implicit $exec
262 SI_RETURN implicit $vgpr2
269 ; GFX10-LABEL: name: fma_vcv_f16
270 ; GFX10: $vgpr0 = IMPLICIT_DEF
271 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
272 ; GFX10-NEXT: $vgpr2 = V_FMAMK_F16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
273 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
274 ; GFX11-LABEL: name: fma_vcv_f16
275 ; GFX11: $vgpr0 = IMPLICIT_DEF
276 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
277 ; GFX11-NEXT: $vgpr2 = V_FMAMK_F16_t16 $vgpr0, 18688, $vgpr1, implicit $mode, implicit $exec
278 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
279 $vgpr0 = IMPLICIT_DEF
280 $vgpr1 = IMPLICIT_DEF
281 $vgpr2 = V_FMA_F16_gfx9_e64 0, $vgpr0, 0, 18688, 0, $vgpr1, 0, 0, 0, implicit $mode, implicit $exec
282 SI_RETURN implicit $vgpr2
289 ; GFX10-LABEL: name: fma_vvc_f16
290 ; GFX10: $vgpr0 = IMPLICIT_DEF
291 ; GFX10-NEXT: $vgpr1 = IMPLICIT_DEF
292 ; GFX10-NEXT: $vgpr2 = V_FMAAK_F16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
293 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
294 ; GFX11-LABEL: name: fma_vvc_f16
295 ; GFX11: $vgpr0 = IMPLICIT_DEF
296 ; GFX11-NEXT: $vgpr1 = IMPLICIT_DEF
297 ; GFX11-NEXT: $vgpr2 = V_FMAAK_F16_t16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
298 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
299 $vgpr0 = IMPLICIT_DEF
300 $vgpr1 = IMPLICIT_DEF
301 $vgpr2 = V_FMA_F16_gfx9_e64 0, $vgpr0, 0, $vgpr1, 0, 18688, 0, 0, 0, implicit $mode, implicit $exec
302 SI_RETURN implicit $vgpr2
309 ; GFX10-LABEL: name: fma_vsc_f16
310 ; GFX10: $vgpr0 = IMPLICIT_DEF
311 ; GFX10-NEXT: $sgpr1 = IMPLICIT_DEF
312 ; GFX10-NEXT: $vgpr2 = V_FMAAK_F16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
313 ; GFX10-NEXT: SI_RETURN implicit $vgpr2
314 ; GFX11-LABEL: name: fma_vsc_f16
315 ; GFX11: $vgpr0 = IMPLICIT_DEF
316 ; GFX11-NEXT: $sgpr1 = IMPLICIT_DEF
317 ; GFX11-NEXT: $vgpr2 = V_FMAAK_F16_t16 $vgpr0, $vgpr1, 18688, implicit $mode, implicit $exec
318 ; GFX11-NEXT: SI_RETURN implicit $vgpr2
319 $vgpr0 = IMPLICIT_DEF
320 $sgpr1 = IMPLICIT_DEF
321 $vgpr2 = V_FMA_F16_gfx9_e64 0, $vgpr0, 0, $vgpr1, 0, 18688, 0, 0, 0, implicit $mode, implicit $exec
322 SI_RETURN implicit $vgpr2