• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3#
4# This is another example of a test giving "Couldn't join subrange!"
5#
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.
9#
10
11---
12name: coalescing_makes_lane_defined
13tracksRegLiveness: true
14body:             |
15  ; CHECK-LABEL: name: coalescing_makes_lane_defined
16  ; CHECK: bb.0:
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
21  ; CHECK: bb.1:
22  ; CHECK:   successors: %bb.2(0x80000000)
23  ; CHECK:   %4.sub0:sgpr_128 = S_MOV_B32 -1
24  ; CHECK: bb.2:
25  ; CHECK:   S_NOP 0, implicit %4
26  bb.0:
27    successors: %bb.1, %bb.2
28
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
34
35  bb.1:
36    successors: %bb.2
37
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
44
45  bb.2:
46    S_NOP 0, implicit killed %3
47
48...
49