1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass si-fold-operands,dead-mi-elimination %s -o - | FileCheck -check-prefix=GCN %s
6 name: shrink_scalar_imm_vgpr_v_add_i32_e64_no_carry_out_use
7 tracksRegLiveness: true
11 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_no_carry_out_use
12 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
13 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
14 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
15 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
16 %0:sreg_32_xm0 = S_MOV_B32 12345
17 %1:vgpr_32 = IMPLICIT_DEF
18 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
19 S_ENDPGM 0, implicit %2
25 name: shrink_vgpr_scalar_imm_v_add_i32_e64_no_carry_out_use
26 tracksRegLiveness: true
30 ; GCN-LABEL: name: shrink_vgpr_scalar_imm_v_add_i32_e64_no_carry_out_use
31 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
32 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
33 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
34 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
35 %0:vgpr_32 = IMPLICIT_DEF
36 %1:sreg_32_xm0 = S_MOV_B32 12345
37 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
38 S_ENDPGM 0, implicit %2
43 name: shrink_scalar_imm_vgpr_v_add_i32_e64_carry_out_use
44 tracksRegLiveness: true
48 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_carry_out_use
49 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
50 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
51 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
52 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
53 %0:sreg_32_xm0 = S_MOV_B32 12345
54 %1:vgpr_32 = IMPLICIT_DEF
55 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
56 S_ENDPGM 0, implicit %2
61 # This does not shrink because it would violate the constant bus
62 # restriction. to have an SGPR input and an immediate, so a copy would
65 name: shrink_vector_imm_sgpr_v_add_i32_e64_no_carry_out_use
66 tracksRegLiveness: true
70 ; GCN-LABEL: name: shrink_vector_imm_sgpr_v_add_i32_e64_no_carry_out_use
71 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
72 ; GCN-NEXT: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
73 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[DEF]], [[V_MOV_B32_e32_]], 0, implicit $exec
74 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]]
75 %0:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
76 %1:sreg_32_xm0 = IMPLICIT_DEF
77 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
78 S_ENDPGM 0, implicit %2
84 name: shrink_sgpr_vector_imm_v_add_i32_e64_no_carry_out_use
85 tracksRegLiveness: true
89 ; GCN-LABEL: name: shrink_sgpr_vector_imm_v_add_i32_e64_no_carry_out_use
90 ; GCN: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
91 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
92 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[V_MOV_B32_e32_]], [[DEF]], 0, implicit $exec
93 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]]
94 %0:sreg_32_xm0 = IMPLICIT_DEF
95 %1:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
96 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
97 S_ENDPGM 0, implicit %2
103 name: shrink_scalar_imm_vgpr_v_add_i32_e64_live_vcc_use
104 tracksRegLiveness: true
108 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_live_vcc_use
109 ; GCN: $vcc = S_MOV_B64 -1
110 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
111 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
112 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
113 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]], implicit $vcc
115 %0:sreg_32_xm0 = S_MOV_B32 12345
116 %1:vgpr_32 = IMPLICIT_DEF
117 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
118 S_ENDPGM 0, implicit %2, implicit $vcc
124 name: shrink_scalar_imm_vgpr_v_add_i32_e64_liveout_vcc_use
125 tracksRegLiveness: true
128 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_liveout_vcc_use
130 ; GCN-NEXT: successors: %bb.1(0x80000000)
132 ; GCN-NEXT: $vcc = S_MOV_B64 -1
133 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
134 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
135 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
138 ; GCN-NEXT: liveins: $vcc
140 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]], implicit $vcc
144 %0:sreg_32_xm0 = S_MOV_B32 12345
145 %1:vgpr_32 = IMPLICIT_DEF
146 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
150 S_ENDPGM 0, implicit %2, implicit $vcc
155 name: shrink_scalar_imm_vgpr_v_add_i32_e64_liveout_vcc_lo_use
156 tracksRegLiveness: true
159 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_liveout_vcc_lo_use
161 ; GCN-NEXT: successors: %bb.1(0x80000000)
163 ; GCN-NEXT: $vcc = S_MOV_B64 -1
164 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
165 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
166 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
169 ; GCN-NEXT: liveins: $vcc_lo
171 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]], implicit $vcc_lo
175 %0:sreg_32_xm0 = S_MOV_B32 12345
176 %1:vgpr_32 = IMPLICIT_DEF
177 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
181 S_ENDPGM 0, implicit %2, implicit $vcc_lo
186 # This is not OK to clobber because vcc_lo has a livein use.
188 name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc
189 tracksRegLiveness: true
192 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc
194 ; GCN-NEXT: successors: %bb.1(0x80000000)
196 ; GCN-NEXT: $vcc = S_MOV_B64 -1
199 ; GCN-NEXT: liveins: $vcc
201 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
202 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
203 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
204 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]], implicit $vcc_lo
211 %0:sreg_32_xm0 = S_MOV_B32 12345
212 %1:vgpr_32 = IMPLICIT_DEF
213 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
214 S_ENDPGM 0, implicit %2, implicit $vcc_lo
219 name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc_hi
220 tracksRegLiveness: true
223 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc_hi
225 ; GCN-NEXT: successors: %bb.1(0x80000000)
227 ; GCN-NEXT: $vcc_hi = S_MOV_B32 -1
230 ; GCN-NEXT: successors: %bb.2(0x80000000)
231 ; GCN-NEXT: liveins: $vcc_hi
233 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
234 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
235 ; GCN-NEXT: [[V_ADD_CO_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_CO_U32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_CO_U32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
238 ; GCN-NEXT: liveins: $vcc_hi
240 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e64_]], implicit $vcc_hi
243 $vcc_hi = S_MOV_B32 -1
247 %0:sreg_32_xm0 = S_MOV_B32 12345
248 %1:vgpr_32 = IMPLICIT_DEF
249 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
254 S_ENDPGM 0, implicit %2, implicit $vcc_hi
260 name: shrink_scalar_imm_vgpr_v_sub_i32_e64_no_carry_out_use
261 tracksRegLiveness: true
265 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_sub_i32_e64_no_carry_out_use
266 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
267 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
268 ; GCN-NEXT: [[V_SUB_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
269 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_SUB_CO_U32_e32_]]
270 %0:sreg_32_xm0 = S_MOV_B32 12345
271 %1:vgpr_32 = IMPLICIT_DEF
272 %2:vgpr_32, %3:sreg_64 = V_SUB_CO_U32_e64 %0, %1, 0, implicit $exec
273 S_ENDPGM 0, implicit %2
279 name: shrink_vgpr_scalar_imm_v_sub_i32_e64_no_carry_out_use
280 tracksRegLiveness: true
284 ; GCN-LABEL: name: shrink_vgpr_scalar_imm_v_sub_i32_e64_no_carry_out_use
285 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
286 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
287 ; GCN-NEXT: [[V_SUBREV_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
288 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_SUBREV_CO_U32_e32_]]
289 %0:vgpr_32 = IMPLICIT_DEF
290 %1:sreg_32_xm0 = S_MOV_B32 12345
291 %2:vgpr_32, %3:sreg_64 = V_SUB_CO_U32_e64 %0, %1, 0, implicit $exec
292 S_ENDPGM 0, implicit %2
298 name: shrink_scalar_imm_vgpr_v_subrev_i32_e64_no_carry_out_use
299 tracksRegLiveness: true
303 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_subrev_i32_e64_no_carry_out_use
304 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
305 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
306 ; GCN-NEXT: [[V_SUBREV_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
307 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_SUBREV_CO_U32_e32_]]
308 %0:sreg_32_xm0 = S_MOV_B32 12345
309 %1:vgpr_32 = IMPLICIT_DEF
310 %2:vgpr_32, %3:sreg_64 = V_SUBREV_CO_U32_e64 %0, %1, 0, implicit $exec
311 S_ENDPGM 0, implicit %2
317 name: shrink_vgpr_scalar_imm_v_subrev_i32_e64_no_carry_out_use
318 tracksRegLiveness: true
322 ; GCN-LABEL: name: shrink_vgpr_scalar_imm_v_subrev_i32_e64_no_carry_out_use
323 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
324 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
325 ; GCN-NEXT: [[V_SUB_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
326 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_SUB_CO_U32_e32_]]
327 %0:vgpr_32 = IMPLICIT_DEF
328 %1:sreg_32_xm0 = S_MOV_B32 12345
329 %2:vgpr_32, %3:sreg_64 = V_SUBREV_CO_U32_e64 %0, %1, 0, implicit $exec
330 S_ENDPGM 0, implicit %2
336 # We know this is OK because vcc isn't live out of the block.
338 name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout
339 tracksRegLiveness: true
342 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout
344 ; GCN-NEXT: successors: %bb.1(0x80000000)
376 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
377 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
378 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
383 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
417 %0:sreg_32_xm0 = S_MOV_B32 12345
418 %1:vgpr_32 = IMPLICIT_DEF
419 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
424 S_ENDPGM 0, implicit %2
430 # We know this is OK because vcc isn't live out of the block, even
431 # though it had a defined but unused. value
433 name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout_dead_vcc_def
434 tracksRegLiveness: true
437 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout_dead_vcc_def
439 ; GCN-NEXT: successors: %bb.1(0x80000000)
441 ; GCN-NEXT: S_NOP 0, implicit-def $vcc
442 ; GCN-NEXT: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
443 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
444 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
449 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
453 S_NOP 0, implicit-def $vcc
454 %0:sreg_32_xm0 = S_MOV_B32 12345
455 %1:vgpr_32 = IMPLICIT_DEF
456 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
461 S_ENDPGM 0, implicit %2
466 # This requires searching through many DBG_VALUE instructions before the insert poitn, which
467 # should not count against the search limit.
469 name: vcc_liveness_dbg_value_search_before
470 tracksRegLiveness: true
474 ; GCN-LABEL: name: vcc_liveness_dbg_value_search_before
475 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
476 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
477 ; GCN-NEXT: DBG_VALUE $noreg, 0
478 ; GCN-NEXT: DBG_VALUE $noreg, 0
479 ; GCN-NEXT: DBG_VALUE $noreg, 0
480 ; GCN-NEXT: DBG_VALUE $noreg, 0
481 ; GCN-NEXT: DBG_VALUE $noreg, 0
482 ; GCN-NEXT: DBG_VALUE $noreg, 0
483 ; GCN-NEXT: DBG_VALUE $noreg, 0
484 ; GCN-NEXT: DBG_VALUE $noreg, 0
485 ; GCN-NEXT: DBG_VALUE $noreg, 0
486 ; GCN-NEXT: DBG_VALUE $noreg, 0
487 ; GCN-NEXT: DBG_VALUE $noreg, 0
488 ; GCN-NEXT: DBG_VALUE $noreg, 0
489 ; GCN-NEXT: DBG_VALUE $noreg, 0
490 ; GCN-NEXT: DBG_VALUE $noreg, 0
491 ; GCN-NEXT: DBG_VALUE $noreg, 0
492 ; GCN-NEXT: DBG_VALUE $noreg, 0
493 ; GCN-NEXT: DBG_VALUE $noreg, 0
494 ; GCN-NEXT: DBG_VALUE $noreg, 0
495 ; GCN-NEXT: DBG_VALUE $noreg, 0
496 ; GCN-NEXT: DBG_VALUE $noreg, 0
497 ; GCN-NEXT: DBG_VALUE $noreg, 0
498 ; GCN-NEXT: DBG_VALUE $noreg, 0
499 ; GCN-NEXT: DBG_VALUE $noreg, 0
500 ; GCN-NEXT: DBG_VALUE $noreg, 0
501 ; GCN-NEXT: DBG_VALUE $noreg, 0
502 ; GCN-NEXT: DBG_VALUE $noreg, 0
503 ; GCN-NEXT: DBG_VALUE $noreg, 0
504 ; GCN-NEXT: DBG_VALUE $noreg, 0
505 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
506 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
507 %0:sreg_32_xm0 = S_MOV_B32 12345
508 %1:vgpr_32 = IMPLICIT_DEF
537 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
538 S_ENDPGM 0, implicit %2
543 # This requires searching through many DBG_VALUE instructions after the insert point, which
544 # should not count against the search limit.
546 name: vcc_liveness_dbg_value_search_after
547 tracksRegLiveness: true
551 ; GCN-LABEL: name: vcc_liveness_dbg_value_search_after
552 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
553 ; GCN-NEXT: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
582 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
583 ; GCN-NEXT: DBG_VALUE $noreg, 0
584 ; GCN-NEXT: DBG_VALUE $noreg, 0
585 ; GCN-NEXT: DBG_VALUE $noreg, 0
586 ; GCN-NEXT: DBG_VALUE $noreg, 0
587 ; GCN-NEXT: DBG_VALUE $noreg, 0
588 ; GCN-NEXT: DBG_VALUE $noreg, 0
589 ; GCN-NEXT: DBG_VALUE $noreg, 0
590 ; GCN-NEXT: DBG_VALUE $noreg, 0
591 ; GCN-NEXT: DBG_VALUE $noreg, 0
592 ; GCN-NEXT: DBG_VALUE $noreg, 0
593 ; GCN-NEXT: DBG_VALUE $noreg, 0
594 ; GCN-NEXT: DBG_VALUE $noreg, 0
595 ; GCN-NEXT: DBG_VALUE $noreg, 0
596 ; GCN-NEXT: DBG_VALUE $noreg, 0
597 ; GCN-NEXT: DBG_VALUE $noreg, 0
598 ; GCN-NEXT: DBG_VALUE $noreg, 0
599 ; GCN-NEXT: DBG_VALUE $noreg, 0
600 ; GCN-NEXT: DBG_VALUE $noreg, 0
601 ; GCN-NEXT: DBG_VALUE $noreg, 0
602 ; GCN-NEXT: DBG_VALUE $noreg, 0
603 ; GCN-NEXT: DBG_VALUE $noreg, 0
604 ; GCN-NEXT: DBG_VALUE $noreg, 0
605 ; GCN-NEXT: DBG_VALUE $noreg, 0
606 ; GCN-NEXT: DBG_VALUE $noreg, 0
607 ; GCN-NEXT: DBG_VALUE $noreg, 0
608 ; GCN-NEXT: DBG_VALUE $noreg, 0
609 ; GCN-NEXT: DBG_VALUE $noreg, 0
610 ; GCN-NEXT: DBG_VALUE $noreg, 0
611 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
612 %0:sreg_32_xm0 = S_MOV_B32 12345
613 %1:vgpr_32 = IMPLICIT_DEF
642 %2:vgpr_32, %3:sreg_64 = V_ADD_CO_U32_e64 %0, %1, 0, implicit $exec
672 S_ENDPGM 0, implicit %2
677 name: shrink_add_kill_flags_src0
678 tracksRegLiveness: true
682 ; GCN-LABEL: name: shrink_add_kill_flags_src0
683 ; GCN: liveins: $vgpr0
685 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
686 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
687 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 killed [[V_MOV_B32_e32_]], [[COPY]], implicit-def $vcc, implicit $exec
688 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
689 %0:vgpr_32 = COPY $vgpr0
690 %1:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
691 %2:vgpr_32, %3:sreg_64_xexec = V_ADD_CO_U32_e64 killed %1, %0, 0, implicit $exec
692 S_ENDPGM 0, implicit %2
696 name: shrink_add_kill_flags_src1
697 tracksRegLiveness: true
701 ; GCN-LABEL: name: shrink_add_kill_flags_src1
702 ; GCN: liveins: $vgpr0
704 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
705 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
706 ; GCN-NEXT: [[V_ADD_CO_U32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_CO_U32_e32 [[V_MOV_B32_e32_]], killed [[COPY]], implicit-def $vcc, implicit $exec
707 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADD_CO_U32_e32_]]
708 %0:vgpr_32 = COPY $vgpr0
709 %1:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
710 %2:vgpr_32, %3:sreg_64_xexec = V_ADD_CO_U32_e64 %1, killed %0, 0, implicit $exec
711 S_ENDPGM 0, implicit %2
715 name: shrink_addc_kill_flags_src2
716 tracksRegLiveness: true
719 liveins: $vgpr0, $vcc
720 ; GCN-LABEL: name: shrink_addc_kill_flags_src2
721 ; GCN: liveins: $vgpr0, $vcc
723 ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
724 ; GCN-NEXT: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
725 ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $vcc
726 ; GCN-NEXT: [[V_ADDC_U32_e64_:%[0-9]+]]:vgpr_32, [[V_ADDC_U32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADDC_U32_e64 [[V_MOV_B32_e32_]], [[COPY]], [[COPY1]], 0, implicit $exec
727 ; GCN-NEXT: S_ENDPGM 0, implicit [[V_ADDC_U32_e64_]]
728 %0:vgpr_32 = COPY $vgpr0
729 %1:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
730 %2:sreg_64_xexec = COPY $vcc
731 %3:vgpr_32, %4:sreg_64_xexec = V_ADDC_U32_e64 %1, %0, %2, 0, implicit $exec
732 S_ENDPGM 0, implicit %3