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: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
14 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
15 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_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_I32_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: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
33 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
34 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_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_I32_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: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
51 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
52 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_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_I32_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: [[DEF:%[0-9]+]]:sreg_32_xm0 = IMPLICIT_DEF
73 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[DEF]], [[V_MOV_B32_e32_]], 0, implicit $exec
74 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_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_I32_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: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 12345, implicit $exec
92 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[V_MOV_B32_e32_]], [[DEF]], 0, implicit $exec
93 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_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_I32_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: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
111 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
112 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
113 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_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_I32_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: successors: %bb.1(0x80000000)
131 ; GCN: $vcc = S_MOV_B64 -1
132 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
133 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
134 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
137 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc
141 %0:sreg_32_xm0 = S_MOV_B32 12345
142 %1:vgpr_32 = IMPLICIT_DEF
143 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
147 S_ENDPGM 0, implicit %2, implicit $vcc
152 name: shrink_scalar_imm_vgpr_v_add_i32_e64_liveout_vcc_lo_use
153 tracksRegLiveness: true
156 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_liveout_vcc_lo_use
158 ; GCN: successors: %bb.1(0x80000000)
159 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
160 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
161 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
163 ; GCN: liveins: $vcc_lo
164 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
168 %0:sreg_32_xm0 = S_MOV_B32 12345
169 %1:vgpr_32 = IMPLICIT_DEF
170 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
174 S_ENDPGM 0, implicit %2, implicit $vcc_lo
179 # This is not OK to clobber because vcc_lo has a livein use.
181 name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc
182 tracksRegLiveness: true
185 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc
187 ; GCN: successors: %bb.1(0x80000000)
188 ; GCN: $vcc = S_MOV_B64 -1
191 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
192 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
193 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
194 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_lo
201 %0:sreg_32_xm0 = S_MOV_B32 12345
202 %1:vgpr_32 = IMPLICIT_DEF
203 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
204 S_ENDPGM 0, implicit %2, implicit $vcc_lo
209 name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc_hi
210 tracksRegLiveness: true
213 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_livein_vcc_hi
215 ; GCN: successors: %bb.1(0x80000000)
216 ; GCN: $vcc_hi = S_MOV_B32 -1
218 ; GCN: successors: %bb.2(0x80000000)
219 ; GCN: liveins: $vcc_hi
220 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
221 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
222 ; GCN: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64 = V_ADD_I32_e64 [[S_MOV_B32_]], [[DEF]], 0, implicit $exec
224 ; GCN: liveins: $vcc_hi
225 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e64_]], implicit $vcc_hi
228 $vcc_hi = S_MOV_B32 -1
232 %0:sreg_32_xm0 = S_MOV_B32 12345
233 %1:vgpr_32 = IMPLICIT_DEF
234 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
239 S_ENDPGM 0, implicit %2, implicit $vcc_hi
245 name: shrink_scalar_imm_vgpr_v_sub_i32_e64_no_carry_out_use
246 tracksRegLiveness: true
250 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_sub_i32_e64_no_carry_out_use
251 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
252 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
253 ; GCN: [[V_SUB_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
254 ; GCN: S_ENDPGM 0, implicit [[V_SUB_I32_e32_]]
255 %0:sreg_32_xm0 = S_MOV_B32 12345
256 %1:vgpr_32 = IMPLICIT_DEF
257 %2:vgpr_32, %3:sreg_64 = V_SUB_I32_e64 %0, %1, 0, implicit $exec
258 S_ENDPGM 0, implicit %2
264 name: shrink_vgpr_scalar_imm_v_sub_i32_e64_no_carry_out_use
265 tracksRegLiveness: true
269 ; GCN-LABEL: name: shrink_vgpr_scalar_imm_v_sub_i32_e64_no_carry_out_use
270 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
271 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
272 ; GCN: [[V_SUBREV_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
273 ; GCN: S_ENDPGM 0, implicit [[V_SUBREV_I32_e32_]]
274 %0:vgpr_32 = IMPLICIT_DEF
275 %1:sreg_32_xm0 = S_MOV_B32 12345
276 %2:vgpr_32, %3:sreg_64 = V_SUB_I32_e64 %0, %1, 0, implicit $exec
277 S_ENDPGM 0, implicit %2
283 name: shrink_scalar_imm_vgpr_v_subrev_i32_e64_no_carry_out_use
284 tracksRegLiveness: true
288 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_subrev_i32_e64_no_carry_out_use
289 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
290 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
291 ; GCN: [[V_SUBREV_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUBREV_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
292 ; GCN: S_ENDPGM 0, implicit [[V_SUBREV_I32_e32_]]
293 %0:sreg_32_xm0 = S_MOV_B32 12345
294 %1:vgpr_32 = IMPLICIT_DEF
295 %2:vgpr_32, %3:sreg_64 = V_SUBREV_I32_e64 %0, %1, 0, implicit $exec
296 S_ENDPGM 0, implicit %2
302 name: shrink_vgpr_scalar_imm_v_subrev_i32_e64_no_carry_out_use
303 tracksRegLiveness: true
307 ; GCN-LABEL: name: shrink_vgpr_scalar_imm_v_subrev_i32_e64_no_carry_out_use
308 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
309 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
310 ; GCN: [[V_SUB_I32_e32_:%[0-9]+]]:vgpr_32 = V_SUB_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
311 ; GCN: S_ENDPGM 0, implicit [[V_SUB_I32_e32_]]
312 %0:vgpr_32 = IMPLICIT_DEF
313 %1:sreg_32_xm0 = S_MOV_B32 12345
314 %2:vgpr_32, %3:sreg_64 = V_SUBREV_I32_e64 %0, %1, 0, implicit $exec
315 S_ENDPGM 0, implicit %2
321 # We know this is OK because vcc isn't live out of the block.
323 name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout
324 tracksRegLiveness: true
327 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout
329 ; GCN: successors: %bb.1(0x80000000)
330 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
331 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
332 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
334 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
368 %0:sreg_32_xm0 = S_MOV_B32 12345
369 %1:vgpr_32 = IMPLICIT_DEF
370 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
375 S_ENDPGM 0, implicit %2
381 # We know this is OK because vcc isn't live out of the block, even
382 # though it had a defined but unused. value
384 name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout_dead_vcc_def
385 tracksRegLiveness: true
388 ; GCN-LABEL: name: shrink_scalar_imm_vgpr_v_add_i32_e64_known_no_liveout_dead_vcc_def
390 ; GCN: successors: %bb.1(0x80000000)
391 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
392 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
393 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
395 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
399 S_NOP 0, implicit-def $vcc
400 %0:sreg_32_xm0 = S_MOV_B32 12345
401 %1:vgpr_32 = IMPLICIT_DEF
402 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
407 S_ENDPGM 0, implicit %2
412 # This requires searching through many DBG_VALUE instructions before the insert poitn, which
413 # should not count against the search limit.
415 name: vcc_liveness_dbg_value_search_before
416 tracksRegLiveness: true
420 ; GCN-LABEL: name: vcc_liveness_dbg_value_search_before
421 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
422 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
423 ; GCN: DBG_VALUE $noreg, 0
424 ; GCN: DBG_VALUE $noreg, 0
425 ; GCN: DBG_VALUE $noreg, 0
426 ; GCN: DBG_VALUE $noreg, 0
427 ; GCN: DBG_VALUE $noreg, 0
428 ; GCN: DBG_VALUE $noreg, 0
429 ; GCN: DBG_VALUE $noreg, 0
430 ; GCN: DBG_VALUE $noreg, 0
431 ; GCN: DBG_VALUE $noreg, 0
432 ; GCN: DBG_VALUE $noreg, 0
433 ; GCN: DBG_VALUE $noreg, 0
434 ; GCN: DBG_VALUE $noreg, 0
435 ; GCN: DBG_VALUE $noreg, 0
436 ; GCN: DBG_VALUE $noreg, 0
437 ; GCN: DBG_VALUE $noreg, 0
438 ; GCN: DBG_VALUE $noreg, 0
439 ; GCN: DBG_VALUE $noreg, 0
440 ; GCN: DBG_VALUE $noreg, 0
441 ; GCN: DBG_VALUE $noreg, 0
442 ; GCN: DBG_VALUE $noreg, 0
443 ; GCN: DBG_VALUE $noreg, 0
444 ; GCN: DBG_VALUE $noreg, 0
445 ; GCN: DBG_VALUE $noreg, 0
446 ; GCN: DBG_VALUE $noreg, 0
447 ; GCN: DBG_VALUE $noreg, 0
448 ; GCN: DBG_VALUE $noreg, 0
449 ; GCN: DBG_VALUE $noreg, 0
450 ; GCN: DBG_VALUE $noreg, 0
451 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
452 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
453 %0:sreg_32_xm0 = S_MOV_B32 12345
454 %1:vgpr_32 = IMPLICIT_DEF
483 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
484 S_ENDPGM 0, implicit %2
489 # This requires searching through many DBG_VALUE instructions after the insert point, which
490 # should not count against the search limit.
492 name: vcc_liveness_dbg_value_search_after
493 tracksRegLiveness: true
497 ; GCN-LABEL: name: vcc_liveness_dbg_value_search_after
498 ; GCN: [[S_MOV_B32_:%[0-9]+]]:sreg_32_xm0 = S_MOV_B32 12345
499 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
500 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[S_MOV_B32_]], [[DEF]], implicit-def $vcc, implicit $exec
501 ; GCN: DBG_VALUE $noreg, 0
502 ; GCN: DBG_VALUE $noreg, 0
503 ; GCN: DBG_VALUE $noreg, 0
504 ; GCN: DBG_VALUE $noreg, 0
505 ; GCN: DBG_VALUE $noreg, 0
506 ; GCN: DBG_VALUE $noreg, 0
507 ; GCN: DBG_VALUE $noreg, 0
508 ; GCN: DBG_VALUE $noreg, 0
509 ; GCN: DBG_VALUE $noreg, 0
510 ; GCN: DBG_VALUE $noreg, 0
511 ; GCN: DBG_VALUE $noreg, 0
512 ; GCN: DBG_VALUE $noreg, 0
513 ; GCN: DBG_VALUE $noreg, 0
514 ; GCN: DBG_VALUE $noreg, 0
515 ; GCN: DBG_VALUE $noreg, 0
516 ; GCN: DBG_VALUE $noreg, 0
517 ; GCN: DBG_VALUE $noreg, 0
518 ; GCN: DBG_VALUE $noreg, 0
519 ; GCN: DBG_VALUE $noreg, 0
520 ; GCN: DBG_VALUE $noreg, 0
521 ; GCN: DBG_VALUE $noreg, 0
522 ; GCN: DBG_VALUE $noreg, 0
523 ; GCN: DBG_VALUE $noreg, 0
524 ; GCN: DBG_VALUE $noreg, 0
525 ; GCN: DBG_VALUE $noreg, 0
526 ; GCN: DBG_VALUE $noreg, 0
527 ; GCN: DBG_VALUE $noreg, 0
528 ; GCN: DBG_VALUE $noreg, 0
529 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
530 %0:sreg_32_xm0 = S_MOV_B32 12345
531 %1:vgpr_32 = IMPLICIT_DEF
560 %2:vgpr_32, %3:sreg_64 = V_ADD_I32_e64 %0, %1, 0, implicit $exec
590 S_ENDPGM 0, implicit %2
595 name: shrink_add_kill_flags_src0
596 tracksRegLiveness: true
600 ; GCN-LABEL: name: shrink_add_kill_flags_src0
601 ; GCN: liveins: $vgpr0
602 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
603 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
604 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 killed [[V_MOV_B32_e32_]], [[COPY]], implicit-def $vcc, implicit $exec
605 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
606 %0:vgpr_32 = COPY $vgpr0
607 %1:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
608 %2:vgpr_32, %3:sreg_64_xexec = V_ADD_I32_e64 killed %1, %0, 0, implicit $exec
609 S_ENDPGM 0, implicit %2
613 name: shrink_add_kill_flags_src1
614 tracksRegLiveness: true
618 ; GCN-LABEL: name: shrink_add_kill_flags_src1
619 ; GCN: liveins: $vgpr0
620 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
621 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
622 ; GCN: [[V_ADD_I32_e32_:%[0-9]+]]:vgpr_32 = V_ADD_I32_e32 [[V_MOV_B32_e32_]], killed [[COPY]], implicit-def $vcc, implicit $exec
623 ; GCN: S_ENDPGM 0, implicit [[V_ADD_I32_e32_]]
624 %0:vgpr_32 = COPY $vgpr0
625 %1:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
626 %2:vgpr_32, %3:sreg_64_xexec = V_ADD_I32_e64 %1, killed %0, 0, implicit $exec
627 S_ENDPGM 0, implicit %2
631 name: shrink_addc_kill_flags_src2
632 tracksRegLiveness: true
635 liveins: $vgpr0, $vcc
636 ; GCN-LABEL: name: shrink_addc_kill_flags_src2
637 ; GCN: liveins: $vgpr0, $vcc
638 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
639 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
640 ; GCN: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $vcc
641 ; GCN: [[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
642 ; GCN: S_ENDPGM 0, implicit [[V_ADDC_U32_e64_]]
643 %0:vgpr_32 = COPY $vgpr0
644 %1:vgpr_32 = V_MOV_B32_e32 518144, implicit $exec
645 %2:sreg_64_xexec = COPY $vcc
646 %3:vgpr_32, %4:sreg_64_xexec = V_ADDC_U32_e64 %1, %0, %2, 0, implicit $exec
647 S_ENDPGM 0, implicit %3