1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx803 -run-pass simple-register-coalescing -verify-machineinstrs -o - %s | FileCheck %s
4 # This is another example of a test giving "Couldn't join subrange!"
6 # This shows a case where a whole reg use point of the whole register was
7 # undefined in one subreg, but after coalescing it became defined but the
8 # subrange was not updated to reflect that.
12 name: coalescing_makes_lane_defined
13 tracksRegLiveness: true
15 ; CHECK-LABEL: name: coalescing_makes_lane_defined
17 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
19 ; CHECK-NEXT: undef %4.sub2:sgpr_128 = S_MOV_B32 0
20 ; CHECK-NEXT: dead undef %7.sub0:sgpr_128 = S_MOV_B32 0
21 ; CHECK-NEXT: S_CBRANCH_SCC0 %bb.2, implicit undef $scc
24 ; CHECK-NEXT: successors: %bb.2(0x80000000)
26 ; CHECK-NEXT: %4.sub0:sgpr_128 = S_MOV_B32 -1
29 ; CHECK-NEXT: S_NOP 0, implicit %4
31 successors: %bb.1, %bb.2
33 %0:sreg_32_xm0 = S_MOV_B32 0
34 undef %1.sub2:sgpr_128 = COPY %0
35 undef %2.sub0:sgpr_128 = S_MOV_B32 0
36 undef %3.sub2:sgpr_128 = COPY %0
37 S_CBRANCH_SCC0 %bb.2, implicit undef $scc
42 undef %4.sub0:sgpr_128 = S_MOV_B32 -1
43 %4.sub2:sgpr_128 = COPY killed %0
44 %5:sgpr_128 = COPY killed %4
45 %6:sgpr_128 = COPY killed %1
46 %3:sgpr_128 = COPY killed %6
47 %2:sgpr_128 = COPY killed %5
50 S_NOP 0, implicit killed %3