1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1150 -mattr=+wavefrontsize32,-wavefrontsize64 -verify-machineinstrs -run-pass=amdgpu-insert-single-use-vdst %s -o - | FileCheck %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1150 -mattr=-wavefrontsize32,+wavefrontsize64 -verify-machineinstrs -run-pass=amdgpu-insert-single-use-vdst %s -o - | FileCheck %s
5 # One single-use producer.
8 tracksRegLiveness: true
10 ; CHECK-LABEL: name: one_producer
12 ; CHECK-NEXT: successors: %bb.1(0x80000000)
13 ; CHECK-NEXT: liveins: $vgpr0
15 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
16 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
17 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
20 ; CHECK-NEXT: liveins: $vgpr0, $vgpr2
24 $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
25 $vgpr2 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
27 liveins: $vgpr0, $vgpr2
30 # One single-use producer of a 64-bit value.
32 name: one_producer_64bit
33 tracksRegLiveness: true
35 ; CHECK-LABEL: name: one_producer_64bit
37 ; CHECK-NEXT: successors: %bb.1(0x80000000)
38 ; CHECK-NEXT: liveins: $vgpr0_vgpr1
40 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
41 ; CHECK-NEXT: $vgpr2_vgpr3 = V_LSHLREV_B64_e64 0, $vgpr0_vgpr1, implicit $exec
42 ; CHECK-NEXT: $vgpr4_vgpr5 = V_LSHLREV_B64_e64 0, $vgpr2_vgpr3, implicit $exec
45 ; CHECK-NEXT: liveins: $vgpr4_vgpr5
49 $vgpr2_vgpr3 = V_LSHLREV_B64_e64 0, $vgpr0_vgpr1, implicit $exec
50 $vgpr4_vgpr5 = V_LSHLREV_B64_e64 0, $vgpr2_vgpr3, implicit $exec
55 # Two consecutive single-use producers.
58 tracksRegLiveness: true
60 ; CHECK-LABEL: name: two_producers
62 ; CHECK-NEXT: successors: %bb.1(0x80000000)
63 ; CHECK-NEXT: liveins: $vgpr0
65 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
66 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
67 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
68 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
69 ; CHECK-NEXT: $vgpr3 = V_ADD_U32_e32 $vgpr0, $vgpr2, implicit $exec
72 ; CHECK-NEXT: liveins: $vgpr0, $vgpr3
76 $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
77 $vgpr2 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
78 $vgpr3 = V_ADD_U32_e32 $vgpr0, $vgpr2, implicit $exec
80 liveins: $vgpr0, $vgpr3
83 # Redefinitions of v0.
86 tracksRegLiveness: true
88 ; CHECK-LABEL: name: redefinitions
90 ; CHECK-NEXT: successors: %bb.1(0x80000000)
91 ; CHECK-NEXT: liveins: $vgpr0
93 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
94 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
95 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
96 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
97 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
98 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
99 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
100 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
105 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
106 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
107 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
108 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
112 # One producer with no consumers.
115 tracksRegLiveness: true
117 ; CHECK-LABEL: name: no_consumer
119 ; CHECK-NEXT: successors: %bb.1(0x80000000)
120 ; CHECK-NEXT: liveins: $vgpr0
122 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
123 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
128 $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
132 # One consumer with two uses of the same value.
134 name: one_consumer_two_uses
135 tracksRegLiveness: true
137 ; CHECK-LABEL: name: one_consumer_two_uses
139 ; CHECK-NEXT: successors: %bb.1(0x80000000)
140 ; CHECK-NEXT: liveins: $vgpr0
142 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
143 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
146 ; CHECK-NEXT: liveins: $vgpr0, $vgpr2
150 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
151 $vgpr2 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
153 liveins: $vgpr0, $vgpr2
159 tracksRegLiveness: true
161 ; CHECK-LABEL: name: longer_example
163 ; CHECK-NEXT: successors: %bb.1(0x80000000)
164 ; CHECK-NEXT: liveins: $vgpr3, $vgpr5, $sgpr0, $sgpr2, $sgpr4, $sgpr5, $sgpr16, $sgpr17, $sgpr18, $sgpr19
166 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
167 ; CHECK-NEXT: $vgpr14 = V_MUL_F32_e32 $sgpr4, $vgpr3, implicit $exec, implicit $mode
168 ; CHECK-NEXT: $sgpr3 = S_MUL_F16 $sgpr0, $sgpr2, implicit $mode
169 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
170 ; CHECK-NEXT: $vgpr15 = V_MUL_F32_e32 $sgpr5, $vgpr3, implicit $exec, implicit $mode
171 ; CHECK-NEXT: $vgpr17 = V_FMA_F32_e64 0, $sgpr16, 0, $vgpr5, 0, $vgpr14, 0, 0, implicit $exec, implicit $mode
172 ; CHECK-NEXT: $sgpr1 = S_ADD_F16 $sgpr0, 15360, implicit $mode
173 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
174 ; CHECK-NEXT: $vgpr15 = V_FMA_F32_e64 0, $sgpr17, 0, $vgpr5, 0, $vgpr15, 0, 0, implicit $exec, implicit $mode
175 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
176 ; CHECK-NEXT: $vgpr14 = V_FMA_F32_e64 0, $sgpr18, 0, $vgpr15, 0, $vgpr17, 0, 0, implicit $exec, implicit $mode
177 ; CHECK-NEXT: $vgpr15 = V_FMA_F32_e64 0, $sgpr19, 0, $vgpr14, 0, $vgpr17, 0, 0, implicit $exec, implicit $mode
178 ; CHECK-NEXT: $vgpr16 = V_LOG_F32_e32 $vgpr15, implicit $exec, implicit $mode
179 ; CHECK-NEXT: $vgpr18 = V_EXP_F32_e32 $vgpr15, implicit $exec, implicit $mode
182 ; CHECK-NEXT: liveins: $vgpr16, $vgpr18
185 liveins: $vgpr3, $vgpr5, $sgpr0, $sgpr2, $sgpr4, $sgpr5, $sgpr16, $sgpr17, $sgpr18, $sgpr19
186 $vgpr14 = V_MUL_F32_e32 $sgpr4, $vgpr3, implicit $exec, implicit $mode
187 $sgpr3 = S_MUL_F16 $sgpr0, $sgpr2, implicit $mode
188 $vgpr15 = V_MUL_F32_e32 $sgpr5, $vgpr3, implicit $exec, implicit $mode
189 $vgpr17 = V_FMA_F32_e64 0, $sgpr16, 0, $vgpr5, 0, $vgpr14, 0, 0, implicit $exec, implicit $mode
190 $sgpr1 = S_ADD_F16 $sgpr0, 15360, implicit $mode
191 $vgpr15 = V_FMA_F32_e64 0, $sgpr17, 0, $vgpr5, 0, $vgpr15, 0, 0, implicit $exec, implicit $mode
192 $vgpr14 = V_FMA_F32_e64 0, $sgpr18, 0, $vgpr15, 0, $vgpr17, 0, 0, implicit $exec, implicit $mode
193 $vgpr15 = V_FMA_F32_e64 0, $sgpr19, 0, $vgpr14, 0, $vgpr17, 0, 0, implicit $exec, implicit $mode
194 $vgpr16 = V_LOG_F32_e32 $vgpr15, implicit $exec, implicit $mode
195 $vgpr18 = V_EXP_F32_e32 $vgpr15, implicit $exec, implicit $mode
197 liveins: $vgpr16, $vgpr18
200 # Multiple uses of v0.
202 name: multiple_uses_1
203 tracksRegLiveness: true
205 ; CHECK-LABEL: name: multiple_uses_1
207 ; CHECK-NEXT: successors: %bb.1(0x80000000)
208 ; CHECK-NEXT: liveins: $vgpr0
210 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
211 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
212 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
215 ; CHECK-NEXT: liveins: $vgpr1, $vgpr2
219 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
220 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
221 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
223 liveins: $vgpr1, $vgpr2
226 # Multiple uses of v0 and redefinitions of v1 and v2.
228 name: multiple_uses_2
229 tracksRegLiveness: true
231 ; CHECK-LABEL: name: multiple_uses_2
233 ; CHECK-NEXT: successors: %bb.1(0x80000000)
234 ; CHECK-NEXT: liveins: $vgpr0
236 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
237 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
238 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
239 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
240 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
241 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
242 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
243 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
246 ; CHECK-NEXT: liveins: $vgpr1, $vgpr2
250 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
251 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
252 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
253 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
254 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
255 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
257 liveins: $vgpr1, $vgpr2
260 # Multiple uses of all but v1.
262 name: multiple_uses_3
263 tracksRegLiveness: true
265 ; CHECK-LABEL: name: multiple_uses_3
267 ; CHECK-NEXT: successors: %bb.1(0x80000000)
268 ; CHECK-NEXT: liveins: $vgpr0
270 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
271 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
272 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
273 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
274 ; CHECK-NEXT: $vgpr3 = V_MOV_B32_e32 $vgpr1, implicit $exec
277 ; CHECK-NEXT: liveins: $vgpr2, $vgpr3
281 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
282 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
283 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
284 $vgpr3 = V_MOV_B32_e32 $vgpr1, implicit $exec
286 liveins: $vgpr2, $vgpr3
289 # Results are live-in to another basic block.
292 tracksRegLiveness: true
294 ; CHECK-LABEL: name: basic_block_1
296 ; CHECK-NEXT: successors: %bb.1(0x80000000)
297 ; CHECK-NEXT: liveins: $vgpr0
299 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
300 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
301 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
304 ; CHECK-NEXT: successors: %bb.2(0x80000000)
305 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1, $vgpr2
307 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
308 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
309 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
312 ; CHECK-NEXT: liveins: $vgpr1, $vgpr2
316 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
317 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
318 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
320 liveins: $vgpr0, $vgpr1, $vgpr2
321 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
322 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
323 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
325 liveins: $vgpr1, $vgpr2
328 # Result v2 has multiple uses in another basic block.
331 tracksRegLiveness: true
333 ; CHECK-LABEL: name: basic_block_2
335 ; CHECK-NEXT: successors: %bb.1(0x80000000)
336 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
338 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr1, implicit $exec
341 ; CHECK-NEXT: successors: %bb.2(0x80000000)
342 ; CHECK-NEXT: liveins: $vgpr2
344 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
345 ; CHECK-NEXT: $vgpr3 = V_MOV_B32_e32 $vgpr2, implicit $exec
346 ; CHECK-NEXT: $vgpr3 = V_MOV_B32_e32 $vgpr2, implicit $exec
349 ; CHECK-NEXT: liveins: $vgpr3
352 liveins: $vgpr0, $vgpr1
353 $vgpr2 = V_MOV_B32_e32 $vgpr1, implicit $exec
356 $vgpr3 = V_MOV_B32_e32 $vgpr2, implicit $exec
357 $vgpr3 = V_MOV_B32_e32 $vgpr2, implicit $exec
362 # Results are redefined in another basic block.
365 tracksRegLiveness: true
367 ; CHECK-LABEL: name: basic_block_3
369 ; CHECK-NEXT: successors: %bb.1(0x80000000)
370 ; CHECK-NEXT: liveins: $vgpr0
372 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
373 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
374 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
375 ; CHECK-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
378 ; CHECK-NEXT: successors: %bb.2(0x80000000)
379 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
381 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
382 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
383 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
386 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1, $vgpr2
390 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
391 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
392 $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec
394 liveins: $vgpr0, $vgpr1
395 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
396 $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
397 $vgpr2 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
399 liveins: $vgpr0, $vgpr1, $vgpr2
402 # Exec modified between producer and consumer.
405 tracksRegLiveness: true
407 ; CHECK-LABEL: name: exec_mask
409 ; CHECK-NEXT: successors: %bb.1(0x80000000)
410 ; CHECK-NEXT: liveins: $sgpr0_sgpr1
412 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
413 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
414 ; CHECK-NEXT: $exec = COPY $sgpr0_sgpr1
415 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
418 ; CHECK-NEXT: liveins: $vgpr0
421 liveins: $sgpr0_sgpr1
422 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
423 $exec = COPY $sgpr0_sgpr1
424 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
429 # Exec_lo modified between producer and consumer.
432 tracksRegLiveness: true
434 ; CHECK-LABEL: name: exec_mask_lo
436 ; CHECK-NEXT: successors: %bb.1(0x80000000)
437 ; CHECK-NEXT: liveins: $sgpr0
439 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
440 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
441 ; CHECK-NEXT: $exec_lo = COPY $sgpr0
442 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
445 ; CHECK-NEXT: liveins: $vgpr0
449 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
450 $exec_lo = COPY $sgpr0
451 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
456 # Exec_hi modified between producer and consumer.
459 tracksRegLiveness: true
461 ; CHECK-LABEL: name: exec_mask_hi
463 ; CHECK-NEXT: successors: %bb.1(0x80000000)
464 ; CHECK-NEXT: liveins: $sgpr0
466 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
467 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
468 ; CHECK-NEXT: $exec_hi = COPY $sgpr0
469 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
472 ; CHECK-NEXT: liveins: $vgpr0
476 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
477 $exec_hi = COPY $sgpr0
478 $vgpr0 = V_MOV_B32_e32 $vgpr0, implicit $exec
483 # Write 32-bit vgpr and then read from low 16 bits.
485 name: write_full_read_lo
486 tracksRegLiveness: true
488 ; CHECK-LABEL: name: write_full_read_lo
490 ; CHECK-NEXT: successors: %bb.1(0x80000000)
492 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
493 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
494 ; CHECK-NEXT: $vgpr1_lo16 = V_MOV_B16_t16_e32 $vgpr0_lo16, implicit $exec
497 ; CHECK-NEXT: liveins: $vgpr1_lo16
500 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
501 $vgpr1_lo16 = V_MOV_B16_t16_e32 $vgpr0_lo16, implicit $exec
506 # Write 32-bit vgpr and then read from high 16 bits.
508 name: write_full_read_hi
509 tracksRegLiveness: true
511 ; CHECK-LABEL: name: write_full_read_hi
513 ; CHECK-NEXT: successors: %bb.1(0x80000000)
515 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
516 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
517 ; CHECK-NEXT: $vgpr1_hi16 = V_MOV_B16_t16_e32 $vgpr0_hi16, implicit $exec
520 ; CHECK-NEXT: liveins: $vgpr1_hi16
523 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
524 $vgpr1_hi16 = V_MOV_B16_t16_e32 $vgpr0_hi16, implicit $exec
529 # Write 32-bit vgpr and then read from both halves.
531 name: write_full_read_both
532 tracksRegLiveness: true
534 ; CHECK-LABEL: name: write_full_read_both
536 ; CHECK-NEXT: successors: %bb.1(0x80000000)
538 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
539 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
540 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
541 ; CHECK-NEXT: $vgpr1_lo16 = V_MOV_B16_t16_e32 $vgpr0_lo16, implicit $exec
542 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
543 ; CHECK-NEXT: $vgpr1_hi16 = V_MOV_B16_t16_e32 $vgpr0_hi16, implicit $exec
546 ; CHECK-NEXT: liveins: $vgpr1
549 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
550 $vgpr1_lo16 = V_MOV_B16_t16_e32 $vgpr0_lo16, implicit $exec
551 $vgpr1_hi16 = V_MOV_B16_t16_e32 $vgpr0_hi16, implicit $exec
556 # Write 32-bit vgpr and then read from both halves in the same instruction.
558 name: write_full_read_both_same_instruction
559 tracksRegLiveness: true
561 ; CHECK-LABEL: name: write_full_read_both_same_instruction
563 ; CHECK-NEXT: successors: %bb.1(0x80000000)
565 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
566 ; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
567 ; CHECK-NEXT: $vgpr1_lo16 = V_ADD_F16_t16_e32 $vgpr0_lo16, $vgpr0_hi16, implicit $mode, implicit $exec
570 ; CHECK-NEXT: liveins: $vgpr1_lo16
573 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
574 $vgpr1_lo16 = V_ADD_F16_t16_e32 $vgpr0_lo16, $vgpr0_hi16, implicit $mode, implicit $exec
579 # Write low 16-bits and then read 32-bit vgpr.
581 name: write_lo_read_full
582 tracksRegLiveness: true
584 ; CHECK-LABEL: name: write_lo_read_full
586 ; CHECK-NEXT: successors: %bb.1(0x80000000)
587 ; CHECK-NEXT: liveins: $vgpr0
589 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
590 ; CHECK-NEXT: $vgpr0_lo16 = V_MOV_B16_t16_e32 0, implicit $exec
591 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
594 ; CHECK-NEXT: liveins: $vgpr1
598 $vgpr0_lo16 = V_MOV_B16_t16_e32 0, implicit $exec
599 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
604 # Write high 16-bits and then read 32-bit vgpr.
606 name: write_hi_read_full
607 tracksRegLiveness: true
609 ; CHECK-LABEL: name: write_hi_read_full
611 ; CHECK-NEXT: successors: %bb.1(0x80000000)
612 ; CHECK-NEXT: liveins: $vgpr0
614 ; CHECK-NEXT: S_SINGLEUSE_VDST 1
615 ; CHECK-NEXT: $vgpr0_hi16 = V_MOV_B16_t16_e32 0, implicit $exec
616 ; CHECK-NEXT: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
619 ; CHECK-NEXT: liveins: $vgpr1
623 $vgpr0_hi16 = V_MOV_B16_t16_e32 0, implicit $exec
624 $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec