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: successors: %bb.1(0x40000000), %bb.2(0x40000000)
18 ; CHECK: undef %4.sub2:sgpr_128 = S_MOV_B32 0
19 ; CHECK: dead undef %7.sub0:sgpr_128 = S_MOV_B32 0
20 ; CHECK: S_CBRANCH_SCC0 %bb.2, implicit undef $scc
22 ; CHECK: successors: %bb.2(0x80000000)
23 ; CHECK: %4.sub0:sgpr_128 = S_MOV_B32 -1
25 ; CHECK: S_NOP 0, implicit %4
27 successors: %bb.1, %bb.2
29 %0:sreg_32_xm0 = S_MOV_B32 0
30 undef %1.sub2:sgpr_128 = COPY %0
31 undef %2.sub0:sgpr_128 = S_MOV_B32 0
32 undef %3.sub2:sgpr_128 = COPY %0
33 S_CBRANCH_SCC0 %bb.2, implicit undef $scc
38 undef %4.sub0:sgpr_128 = S_MOV_B32 -1
39 %4.sub2:sgpr_128 = COPY killed %0
40 %5:sgpr_128 = COPY killed %4
41 %6:sgpr_128 = COPY killed %1
42 %3:sgpr_128 = COPY killed %6
43 %2:sgpr_128 = COPY killed %5
46 S_NOP 0, implicit killed %3