1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1031 -run-pass=register-coalescer -verify-coalescing -o - %s | FileCheck %s
4 # Testcase variants from
5 # liveout-implicit-def-subreg-redef-blender-verifier-error.mir which
6 # hit other verifier errors after coalescing.
8 # Same as previous, except the initial value isn't an implicit_def
10 name: liveout_defined_register_redefine_sub0_implicit_def
11 tracksRegLiveness: true
13 ; CHECK-LABEL: name: liveout_defined_register_redefine_sub0_implicit_def
15 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
17 ; CHECK-NEXT: S_CBRANCH_SCC0 %bb.2, implicit undef $scc
20 ; CHECK-NEXT: successors: %bb.3(0x80000000)
22 ; CHECK-NEXT: S_NOP 0, implicit-def %0
23 ; CHECK-NEXT: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_128 = S_MOV_B32 0
24 ; CHECK-NEXT: S_BRANCH %bb.3
27 ; CHECK-NEXT: successors: %bb.3(0x80000000)
29 ; CHECK-NEXT: undef [[DEF:%[0-9]+]].sub0:sgpr_128 = IMPLICIT_DEF
30 ; CHECK-NEXT: undef [[S_MOV_B32_:%[0-9]+]].sub0:sgpr_128 = IMPLICIT_DEF
33 ; CHECK-NEXT: S_NOP 0, implicit [[DEF]]
34 ; CHECK-NEXT: S_NOP 0, implicit [[S_MOV_B32_]].sub0
35 ; CHECK-NEXT: S_ENDPGM 0
37 S_CBRANCH_SCC0 %bb.2, implicit undef $scc
40 S_NOP 0, implicit-def %0:sgpr_128
41 %1:sgpr_32 = S_MOV_B32 0
45 undef %0.sub0:sgpr_128 = IMPLICIT_DEF
46 %1:sgpr_32 = COPY %0.sub0
57 name: second_def_is_real
58 tracksRegLiveness: true
60 ; CHECK-LABEL: name: second_def_is_real
62 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
64 ; CHECK-NEXT: S_CBRANCH_SCC0 %bb.2, implicit undef $scc
67 ; CHECK-NEXT: successors: %bb.3(0x80000000)
69 ; CHECK-NEXT: S_NOP 0, implicit-def %0
70 ; CHECK-NEXT: [[S_MOV_B32_:%[0-9]+]]:sgpr_32 = S_MOV_B32 0
71 ; CHECK-NEXT: S_BRANCH %bb.3
74 ; CHECK-NEXT: successors: %bb.3(0x80000000)
76 ; CHECK-NEXT: undef [[S_MOV_B32_1:%[0-9]+]].sub0:sgpr_128 = S_MOV_B32 123
77 ; CHECK-NEXT: [[S_MOV_B32_:%[0-9]+]]:sgpr_32 = S_MOV_B32 123
80 ; CHECK-NEXT: S_NOP 0, implicit [[S_MOV_B32_1]]
81 ; CHECK-NEXT: S_NOP 0, implicit [[S_MOV_B32_]]
82 ; CHECK-NEXT: S_ENDPGM 0
84 S_CBRANCH_SCC0 %bb.2, implicit undef $scc
87 S_NOP 0, implicit-def %0:sgpr_128
88 %1:sgpr_32 = S_MOV_B32 0
92 undef %0.sub0:sgpr_128 = S_MOV_B32 123
93 %1:sgpr_32 = COPY %0.sub0