1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx90a -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN %s
5 name: highest_reg_shift_amt_v7
6 tracksRegLiveness: true
10 ; GCN-LABEL: name: highest_reg_shift_amt_v7
11 ; GCN: $vgpr7 = IMPLICIT_DEF
12 ; GCN-NEXT: $vgpr2_vgpr3 = IMPLICIT_DEF
13 ; GCN-NEXT: S_WAITCNT 0
14 ; GCN-NEXT: $vgpr0, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr0, implicit $exec
15 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr0, killed $vgpr2_vgpr3, implicit $exec
16 ; GCN-NEXT: $vgpr7, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr7, implicit $exec
18 $vgpr2_vgpr3 = IMPLICIT_DEF
19 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr2_vgpr3, implicit $exec
23 name: highest_reg_shift_amt_v15
24 tracksRegLiveness: true
28 ; GCN-LABEL: name: highest_reg_shift_amt_v15
29 ; GCN: $vgpr15 = IMPLICIT_DEF
30 ; GCN-NEXT: $vgpr2_vgpr3 = IMPLICIT_DEF
31 ; GCN-NEXT: S_WAITCNT 0
32 ; GCN-NEXT: $vgpr0, $vgpr15 = V_SWAP_B32 undef $vgpr15, undef $vgpr0, implicit $exec
33 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr0, killed $vgpr2_vgpr3, implicit $exec
34 ; GCN-NEXT: $vgpr15, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr15, implicit $exec
35 $vgpr15 = IMPLICIT_DEF
36 $vgpr2_vgpr3 = IMPLICIT_DEF
37 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 killed $vgpr15, killed $vgpr2_vgpr3, implicit $exec
41 name: highest_reg_shift_amt_v255
42 tracksRegLiveness: true
46 ; GCN-LABEL: name: highest_reg_shift_amt_v255
47 ; GCN: $vgpr255 = IMPLICIT_DEF
48 ; GCN-NEXT: $vgpr2_vgpr3 = IMPLICIT_DEF
49 ; GCN-NEXT: S_WAITCNT 0
50 ; GCN-NEXT: $vgpr0, $vgpr255 = V_SWAP_B32 undef $vgpr255, undef $vgpr0, implicit $exec
51 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr0, killed $vgpr2_vgpr3, implicit $exec
52 ; GCN-NEXT: $vgpr255, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr255, implicit $exec
53 $vgpr255 = IMPLICIT_DEF
54 $vgpr2_vgpr3 = IMPLICIT_DEF
55 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 killed $vgpr255, killed $vgpr2_vgpr3, implicit $exec
59 name: highest_reg_shift_amt_used_v0_dst
60 tracksRegLiveness: true
64 ; GCN-LABEL: name: highest_reg_shift_amt_used_v0_dst
65 ; GCN: $vgpr7 = IMPLICIT_DEF
66 ; GCN-NEXT: $vgpr2_vgpr3 = IMPLICIT_DEF
67 ; GCN-NEXT: S_WAITCNT 0
68 ; GCN-NEXT: $vgpr4, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr4, implicit $exec
69 ; GCN-NEXT: renamable $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr4, killed $vgpr2_vgpr3, implicit $exec
70 ; GCN-NEXT: $vgpr7, $vgpr4 = V_SWAP_B32 $vgpr4, $vgpr7, implicit $exec
72 $vgpr2_vgpr3 = IMPLICIT_DEF
73 renamable $vgpr0_vgpr1 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr2_vgpr3, implicit $exec
77 name: highest_reg_shift_amt_used_v0_src
78 tracksRegLiveness: true
82 ; GCN-LABEL: name: highest_reg_shift_amt_used_v0_src
83 ; GCN: $vgpr7 = IMPLICIT_DEF
84 ; GCN-NEXT: $vgpr0_vgpr1 = IMPLICIT_DEF
85 ; GCN-NEXT: S_WAITCNT 0
86 ; GCN-NEXT: $vgpr4, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr4, implicit $exec
87 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr4, killed $vgpr0_vgpr1, implicit $exec
88 ; GCN-NEXT: $vgpr7, $vgpr4 = V_SWAP_B32 $vgpr4, $vgpr7, implicit $exec
90 $vgpr0_vgpr1 = IMPLICIT_DEF
91 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr0_vgpr1, implicit $exec
95 name: highest_reg_shift_amt_used_v0_both
96 tracksRegLiveness: true
100 ; GCN-LABEL: name: highest_reg_shift_amt_used_v0_both
101 ; GCN: $vgpr7 = IMPLICIT_DEF
102 ; GCN-NEXT: $vgpr0_vgpr1 = IMPLICIT_DEF
103 ; GCN-NEXT: S_WAITCNT 0
104 ; GCN-NEXT: $vgpr2, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr2, implicit $exec
105 ; GCN-NEXT: renamable $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr2, killed $vgpr0_vgpr1, implicit $exec
106 ; GCN-NEXT: $vgpr7, $vgpr2 = V_SWAP_B32 $vgpr2, $vgpr7, implicit $exec
107 $vgpr7 = IMPLICIT_DEF
108 $vgpr0_vgpr1 = IMPLICIT_DEF
109 renamable $vgpr0_vgpr1 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr0_vgpr1, implicit $exec
113 name: highest_reg_shift_amt_overlapped_src
114 tracksRegLiveness: true
118 ; GCN-LABEL: name: highest_reg_shift_amt_overlapped_src
119 ; GCN: $vgpr7 = IMPLICIT_DEF
120 ; GCN-NEXT: $vgpr6_vgpr7 = IMPLICIT_DEF
121 ; GCN-NEXT: S_WAITCNT 0
122 ; GCN-NEXT: $vgpr2, $vgpr6 = V_SWAP_B32 undef $vgpr6, undef $vgpr2, implicit $exec
123 ; GCN-NEXT: $vgpr3, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr3, implicit $exec
124 ; GCN-NEXT: renamable $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr3, undef $vgpr2_vgpr3, implicit $exec
125 ; GCN-NEXT: $vgpr6, $vgpr2 = V_SWAP_B32 $vgpr2, $vgpr6, implicit $exec
126 ; GCN-NEXT: $vgpr7, $vgpr3 = V_SWAP_B32 $vgpr3, $vgpr7, implicit $exec
127 $vgpr7 = IMPLICIT_DEF
128 $vgpr6_vgpr7 = IMPLICIT_DEF
129 renamable $vgpr0_vgpr1 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr6_vgpr7, implicit $exec
133 name: highest_reg_shift_amt_overlapped_dst
134 tracksRegLiveness: true
138 ; GCN-LABEL: name: highest_reg_shift_amt_overlapped_dst
139 ; GCN: $vgpr7 = IMPLICIT_DEF
140 ; GCN-NEXT: $vgpr0_vgpr1 = IMPLICIT_DEF
141 ; GCN-NEXT: S_WAITCNT 0
142 ; GCN-NEXT: $vgpr2, $vgpr6 = V_SWAP_B32 undef $vgpr6, undef $vgpr2, implicit $exec
143 ; GCN-NEXT: $vgpr3, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr3, implicit $exec
144 ; GCN-NEXT: $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr3, killed $vgpr0_vgpr1, implicit $exec
145 ; GCN-NEXT: $vgpr6, $vgpr2 = V_SWAP_B32 $vgpr2, $vgpr6, implicit $exec
146 ; GCN-NEXT: $vgpr7, $vgpr3 = V_SWAP_B32 $vgpr3, $vgpr7, implicit $exec
147 $vgpr7 = IMPLICIT_DEF
148 $vgpr0_vgpr1 = IMPLICIT_DEF
149 renamable $vgpr6_vgpr7 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr0_vgpr1, implicit $exec
153 name: highest_reg_shift_amt_overlapped_both
154 tracksRegLiveness: true
158 ; GCN-LABEL: name: highest_reg_shift_amt_overlapped_both
159 ; GCN: $vgpr7 = IMPLICIT_DEF
160 ; GCN-NEXT: $vgpr6_vgpr7 = IMPLICIT_DEF
161 ; GCN-NEXT: S_WAITCNT 0
162 ; GCN-NEXT: $vgpr0, $vgpr6 = V_SWAP_B32 undef $vgpr6, undef $vgpr0, implicit $exec
163 ; GCN-NEXT: $vgpr1, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr1, implicit $exec
164 ; GCN-NEXT: $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr1, undef $vgpr0_vgpr1, implicit $exec
165 ; GCN-NEXT: $vgpr6, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr6, implicit $exec
166 ; GCN-NEXT: $vgpr7, $vgpr1 = V_SWAP_B32 $vgpr1, $vgpr7, implicit $exec
167 $vgpr7 = IMPLICIT_DEF
168 $vgpr6_vgpr7 = IMPLICIT_DEF
169 renamable $vgpr6_vgpr7 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr6_vgpr7, implicit $exec
173 name: highest_reg_shift_amt_hazard_in_swap
174 tracksRegLiveness: true
178 ; GCN-LABEL: name: highest_reg_shift_amt_hazard_in_swap
179 ; GCN: $vgpr7 = IMPLICIT_DEF
180 ; GCN-NEXT: $vgpr0_vgpr1 = IMPLICIT_DEF
181 ; GCN-NEXT: $vgpr4_vgpr5 = V_MFMA_F64_4X4X4F64_vgprcd_e64 $vgpr0_vgpr1, $vgpr0_vgpr1, $vgpr0_vgpr1, 0, 0, 0, implicit $mode, implicit $exec
182 ; GCN-NEXT: S_WAITCNT 0
184 ; GCN-NEXT: $vgpr4, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr4, implicit $exec
185 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr4, killed $vgpr0_vgpr1, implicit $exec
186 ; GCN-NEXT: $vgpr7, $vgpr4 = V_SWAP_B32 $vgpr4, $vgpr7, implicit $exec
187 $vgpr7 = IMPLICIT_DEF
188 $vgpr0_vgpr1 = IMPLICIT_DEF
189 $vgpr4_vgpr5 = V_MFMA_F64_4X4X4F64_vgprcd_e64 $vgpr0_vgpr1, $vgpr0_vgpr1, $vgpr0_vgpr1, 0, 0, 0, implicit $mode, implicit $exec
190 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr0_vgpr1, implicit $exec
194 name: highest_reg_shift_amt_hazard_in_swap2
195 tracksRegLiveness: true
199 ; GCN-LABEL: name: highest_reg_shift_amt_hazard_in_swap2
200 ; GCN: $vgpr1 = IMPLICIT_DEF
201 ; GCN-NEXT: $vgpr7 = IMPLICIT_DEF
202 ; GCN-NEXT: $vgpr6_vgpr7 = IMPLICIT_DEF
203 ; GCN-NEXT: $vgpr1 = V_DOT4C_I32_I8_e32 $vgpr7, $vgpr7, $vgpr1, implicit $exec
204 ; GCN-NEXT: S_WAITCNT 0
205 ; GCN-NEXT: $vgpr0, $vgpr6 = V_SWAP_B32 undef $vgpr6, undef $vgpr0, implicit $exec
207 ; GCN-NEXT: $vgpr1, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr1, implicit $exec
208 ; GCN-NEXT: $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr1, undef $vgpr0_vgpr1, implicit $exec
209 ; GCN-NEXT: $vgpr6, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr6, implicit $exec
210 ; GCN-NEXT: $vgpr7, $vgpr1 = V_SWAP_B32 $vgpr1, $vgpr7, implicit $exec
211 $vgpr1 = IMPLICIT_DEF
212 $vgpr7 = IMPLICIT_DEF
213 $vgpr6_vgpr7 = IMPLICIT_DEF
214 $vgpr1 = V_DOT4C_I32_I8_e32 $vgpr7, $vgpr7, $vgpr1, implicit $exec
215 renamable $vgpr6_vgpr7 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr6_vgpr7, implicit $exec
219 name: highest_reg_shift_amt_v7_bundle
220 tracksRegLiveness: true
224 ; GCN-LABEL: name: highest_reg_shift_amt_v7_bundle
225 ; GCN: $vgpr7 = IMPLICIT_DEF
226 ; GCN-NEXT: $vgpr2_vgpr3 = IMPLICIT_DEF
227 ; GCN-NEXT: BUNDLE implicit-def $vgpr2_vgpr3, implicit-def $vgpr7 {
228 ; GCN-NEXT: S_WAITCNT 0
229 ; GCN-NEXT: $vgpr0, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr0, implicit $exec
230 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr0, killed $vgpr2_vgpr3, implicit $exec
232 ; GCN-NEXT: $vgpr7, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr7, implicit $exec
233 $vgpr7 = IMPLICIT_DEF
234 $vgpr2_vgpr3 = IMPLICIT_DEF
235 BUNDLE implicit-def $vgpr2_vgpr3, implicit-def $vgpr7 {
236 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 $vgpr7, killed $vgpr2_vgpr3, implicit $exec
241 name: highest_reg_shift_amt_hazard_in_swap2_bundle
242 tracksRegLiveness: true
246 ; GCN-LABEL: name: highest_reg_shift_amt_hazard_in_swap2_bundle
247 ; GCN: $vgpr1 = IMPLICIT_DEF
248 ; GCN-NEXT: $vgpr7 = IMPLICIT_DEF
249 ; GCN-NEXT: $vgpr6_vgpr7 = IMPLICIT_DEF
250 ; GCN-NEXT: BUNDLE internal $vgpr7, implicit-def $vgpr1, implicit-def $vgpr6_vgpr7 {
251 ; GCN-NEXT: $vgpr1 = IMPLICIT_DEF
252 ; GCN-NEXT: $vgpr7 = IMPLICIT_DEF
253 ; GCN-NEXT: $vgpr6_vgpr7 = IMPLICIT_DEF
254 ; GCN-NEXT: $vgpr1 = V_DOT4C_I32_I8_e32 $vgpr7, $vgpr7, $vgpr1, implicit $exec
255 ; GCN-NEXT: S_WAITCNT 0
256 ; GCN-NEXT: $vgpr0, $vgpr6 = V_SWAP_B32 undef $vgpr6, undef $vgpr0, implicit $exec
258 ; GCN-NEXT: $vgpr1, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr1, implicit $exec
259 ; GCN-NEXT: $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr1, undef $vgpr0_vgpr1, implicit $exec
261 ; GCN-NEXT: $vgpr6, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr6, implicit $exec
262 ; GCN-NEXT: $vgpr7, $vgpr1 = V_SWAP_B32 $vgpr1, $vgpr7, implicit $exec
263 $vgpr1 = IMPLICIT_DEF
264 $vgpr7 = IMPLICIT_DEF
265 $vgpr6_vgpr7 = IMPLICIT_DEF
266 BUNDLE implicit-def $vgpr1, implicit-def $vgpr6_vgpr7, internal $vgpr7 {
267 $vgpr1 = IMPLICIT_DEF
268 $vgpr7 = IMPLICIT_DEF
269 $vgpr6_vgpr7 = IMPLICIT_DEF
270 $vgpr1 = V_DOT4C_I32_I8_e32 $vgpr7, $vgpr7, $vgpr1, implicit $exec
271 renamable $vgpr6_vgpr7 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr6_vgpr7, implicit $exec
276 name: highest_reg_shift_amt_v7_defined
277 tracksRegLiveness: true
281 ; GCN-LABEL: name: highest_reg_shift_amt_v7_defined
282 ; GCN: $vgpr0 = IMPLICIT_DEF
283 ; GCN-NEXT: $vgpr7 = IMPLICIT_DEF
284 ; GCN-NEXT: $vgpr2_vgpr3 = IMPLICIT_DEF
285 ; GCN-NEXT: S_WAITCNT 0
286 ; GCN-NEXT: $vgpr0, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr0, implicit $exec
287 ; GCN-NEXT: renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 undef $vgpr0, killed $vgpr2_vgpr3, implicit $exec
288 ; GCN-NEXT: $vgpr7, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr7, implicit $exec
289 $vgpr0 = IMPLICIT_DEF
290 $vgpr7 = IMPLICIT_DEF
291 $vgpr2_vgpr3 = IMPLICIT_DEF
292 renamable $vgpr2_vgpr3 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr2_vgpr3, implicit $exec
296 name: highest_reg_shift_amt_hazard_in_swap2_defined
297 tracksRegLiveness: true
301 ; GCN-LABEL: name: highest_reg_shift_amt_hazard_in_swap2_defined
302 ; GCN: $vgpr0 = IMPLICIT_DEF
303 ; GCN-NEXT: $vgpr1 = IMPLICIT_DEF
304 ; GCN-NEXT: $vgpr7 = IMPLICIT_DEF
305 ; GCN-NEXT: $vgpr6_vgpr7 = IMPLICIT_DEF
306 ; GCN-NEXT: $vgpr1 = V_DOT4C_I32_I8_e32 $vgpr7, $vgpr7, $vgpr1, implicit $exec
307 ; GCN-NEXT: S_WAITCNT 0
308 ; GCN-NEXT: $vgpr0, $vgpr6 = V_SWAP_B32 undef $vgpr6, undef $vgpr0, implicit $exec
310 ; GCN-NEXT: $vgpr1, $vgpr7 = V_SWAP_B32 undef $vgpr7, undef $vgpr1, implicit $exec
311 ; GCN-NEXT: $vgpr0_vgpr1 = V_LSHRREV_B64_e64 undef $vgpr1, undef $vgpr0_vgpr1, implicit $exec
312 ; GCN-NEXT: $vgpr6, $vgpr0 = V_SWAP_B32 $vgpr0, $vgpr6, implicit $exec
313 ; GCN-NEXT: $vgpr7, $vgpr1 = V_SWAP_B32 $vgpr1, $vgpr7, implicit $exec
314 $vgpr0 = IMPLICIT_DEF
315 $vgpr1 = IMPLICIT_DEF
316 $vgpr7 = IMPLICIT_DEF
317 $vgpr6_vgpr7 = IMPLICIT_DEF
318 $vgpr1 = V_DOT4C_I32_I8_e32 $vgpr7, $vgpr7, $vgpr1, implicit $exec
319 renamable $vgpr6_vgpr7 = V_LSHRREV_B64_e64 killed $vgpr7, killed $vgpr6_vgpr7, implicit $exec