1 # RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -O3 -start-before=livevars %s -o /dev/null 2>&1
2 # Test that coalesing of an empty live range (undef) does not cause failure.
5 define dso_local void @fun(ptr %src, ptr %dst) #0 {
6 %1 = sdiv i64 poison, poison
7 %2 = load i32, ptr %src, align 4
8 br i1 poison, label %6, label %3
11 %4 = trunc i64 %1 to i32
16 %7 = phi i32 [ %5, %3 ], [ 1, %0 ]
17 store i32 %7, ptr %dst, align 4
25 tracksRegLiveness: true
27 - { id: 0, class: gr64bit }
28 - { id: 1, class: gr32bit }
29 - { id: 2, class: grx32bit }
30 - { id: 3, class: grx32bit }
31 - { id: 4, class: addr64bit }
32 - { id: 5, class: addr64bit }
33 - { id: 6, class: grx32bit }
34 - { id: 7, class: grx32bit }
35 - { id: 8, class: grx32bit }
36 - { id: 9, class: gr64bit }
37 - { id: 10, class: gr64bit }
38 - { id: 11, class: gr128bit }
39 - { id: 12, class: gr128bit }
40 - { id: 13, class: gr128bit }
41 - { id: 14, class: gr128bit }
42 - { id: 15, class: gr64bit }
44 - { reg: '$r2d', virtual-reg: '%4' }
45 - { reg: '$r3d', virtual-reg: '%5' }
48 machineFunctionInfo: {}
53 %5:addr64bit = COPY $r3d
54 %4:addr64bit = COPY $r2d
55 %6:grx32bit = LHIMux 1
56 %7:grx32bit = LHIMux 0
57 CHIMux killed %7, 0, implicit-def $cc
58 BRC 14, 6, %bb.2, implicit $cc
62 %1:gr32bit = LMux %4, 0, $noreg :: (load (s32) from %ir.src)
64 %14:gr128bit = INSERT_SUBREG undef %13:gr128bit, %15, %subreg.subreg_h64
65 %11:gr128bit = INSERT_SUBREG %14, undef %9:gr64bit, %subreg.subreg_l64
66 %12:gr128bit = DLR %11, %1
67 %2:grx32bit = COPY %12.subreg_ll32
70 %3:grx32bit = PHI %6, %bb.0, %2, %bb.1
71 STMux %3, %5, 0, $noreg :: (store (s32) into %ir.dst)