1# RUN: llc -mtriple=s390x-ibm-linux -systemz-subreg-liveness -verify-machineinstrs -start-before=simple-register-coalescing -o - %s | FileCheck %s
2
3# Check for successful compilation.
4# CHECK: lhi %r0, 0
5
6--- |
7  target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
8  target triple = "s390x-ibm-linux"
9
10  @g_105 = external dso_local global i8, align 2
11  @g_149 = external dso_local unnamed_addr global i8, align 2
12
13  define void @main() #0 {
14    ret void
15  }
16  attributes #0 = { nounwind "target-cpu"="z13" "target-features"="+transactional-execution,+vector" }
17...
18
19---
20name:            main
21alignment:       16
22tracksRegLiveness: true
23body:             |
24  bb.0:
25    %8:grx32bit = LHIMux 0
26    %9:gr64bit = LGHI 0
27    %17:addr64bit = LARL @g_105
28    %19:grx32bit = IMPLICIT_DEF
29    %20:gr32bit = COPY %8
30    %21:gr32bit = COPY %8
31
32  bb.1:
33    successors: %bb.3(0x7fffffff), %bb.2(0x00000001)
34
35    %2:gr32bit = COPY killed %21
36    %1:gr32bit = COPY killed %20
37    %0:grx32bit = COPY killed %19
38    TMLMux killed %0, 255, implicit-def $cc
39    %3:gr64bit = COPY %9
40    %3:gr64bit = LOCGHI %3, 1, 15, 7, implicit $cc
41    BRC 15, 8, %bb.3, implicit killed $cc
42    J %bb.2
43
44  bb.2:
45    successors:
46
47  bb.3:
48    %10:gr32bit = COPY killed %2
49    %10:gr32bit = OR %10, killed %1, implicit-def dead $cc
50    undef %11.subreg_l32:gr64bit = COPY killed %10
51    %13:gr64bit = COPY killed %11
52    %13:gr64bit = ROSBG %13, killed %3, 32, 63, 0, implicit-def dead $cc
53    CHIMux %8, 0, implicit-def $cc
54    BRC 14, 6, %bb.5, implicit killed $cc
55    J %bb.4
56
57  bb.4:
58
59  bb.5:
60    successors: %bb.7(0x00000001), %bb.6(0x7fffffff)
61
62    %4:grx32bit = COPY killed %13.subreg_l32
63    CHIMux undef %16:grx32bit, 10, implicit-def $cc
64    BRC 14, 8, %bb.7, implicit killed $cc
65    J %bb.6
66
67  bb.6:
68    %6:grx32bit = LBMux %17, 0, $noreg :: (dereferenceable load (s8) from @g_105, align 2)
69    %19:grx32bit = COPY killed %6
70    %20:gr32bit = COPY killed %4
71    %21:gr32bit = IMPLICIT_DEF
72    J %bb.1
73
74  bb.7:
75    %18:addr64bit = LARL @g_149
76    STCMux killed %4, killed %18, 0, $noreg :: (store (s8) into @g_149, align 2)
77
78...
79