1# RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -start-before=greedy %s -o - \ 2# RUN: | FileCheck %s 3# 4# Test that regalloc manages (via regalloc hints) to avoid a LOCRMux jump 5# sequence expansion. 6 7--- | 8 9 declare i8* @foo(i8*, i32 signext, i32 signext) local_unnamed_addr 10 11 define i8* @fun(i8* returned) { 12 br label %2 13 14 ; <label>:2: ; preds = %6, %1 15 %3 = zext i16 undef to i32 16 switch i32 %3, label %4 [ 17 i32 15, label %6 18 i32 125, label %5 19 ] 20 21 ; <label>:4: ; preds = %2 22 br label %6 23 24 ; <label>:5: ; preds = %2 25 br label %6 26 27 ; <label>:6: ; preds = %5, %4, %2 28 %7 = phi i32 [ 4, %2 ], [ undef, %4 ], [ 10, %5 ] 29 %8 = call i8* @foo(i8* undef, i32 signext undef, i32 signext %7) 30 br label %2 31 } 32 33... 34 35# CHECK: locr 36# CHECK-NOT: risblg 37 38--- 39name: fun 40alignment: 2 41tracksRegLiveness: true 42registers: 43 - { id: 0, class: gr32bit } 44 - { id: 1, class: gr64bit } 45 - { id: 2, class: grx32bit } 46 - { id: 3, class: grx32bit } 47 - { id: 4, class: grx32bit } 48 - { id: 5, class: grx32bit } 49 - { id: 6, class: grx32bit } 50 - { id: 7, class: gr64bit } 51 - { id: 8, class: gr64bit } 52 - { id: 9, class: gr64bit } 53 - { id: 10, class: gr64bit } 54 - { id: 11, class: gr32bit } 55frameInfo: 56 hasCalls: true 57body: | 58 bb.0 (%ir-block.1): 59 %3 = LHIMux 0 60 %2 = LHIMux 4 61 %5 = LHIMux 10 62 63 bb.1 (%ir-block.2): 64 CHIMux %3, 0, implicit-def $cc 65 %0 = LOCRMux undef %0, %5, 14, 6, implicit $cc 66 %0 = LOCRMux %0, %2, 14, 6, implicit killed $cc 67 ADJCALLSTACKDOWN 0, 0 68 %7 = LGFR %0 69 $r3d = LGHI 0 70 $r4d = COPY %7 71 CallBRASL @foo, undef $r2d, killed $r3d, killed $r4d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc, implicit-def dead $r2d 72 ADJCALLSTACKUP 0, 0 73 J %bb.1 74 75... 76