| # RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -run-pass=regallocbasic %s -o - | FileCheck %s | |
| # This test used to assert in RABasic. The problem was when we split live-ranges, | |
| # we were not updating the LiveRegMatrix properly and the interference calculation | |
| # wouldn't match what the assignment thought it could do. | |
| # In other words, this test case needs to trigger live-range splitting to exercise | |
| # the problem. | |
| # | |
| # PR33057 | |
| --- | | |
| target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" | |
| target triple = "s390x--linux-gnu" | |
| define void @autogen_SD21418() #0 { | |
| ret void | |
| } | |
| attributes #0 = { "target-cpu"="z13" } | |
| ... | |
| # CHECK: name: autogen_SD21418 | |
| # Check that at least one live-range has been split | |
| # CHECK: id: 53, class | |
| --- | |
| name: autogen_SD21418 | |
| alignment: 4 | |
| frameInfo: | |
| adjustsStack: true | |
| constants: | |
| - id: 0 | |
| value: double 0xD55960F86F577076 | |
| alignment: 8 | |
| body: | | |
| bb.0: | |
| %11:vr128bit = VGBM 0 | |
| %43:grx32bit = LHIMux 0 | |
| %44:addr64bit = LARL %const.0 | |
| %45:vr64bit = VL64 %44, 0, $noreg :: (load (s64) from constant-pool) | |
| bb.1: | |
| ADJCALLSTACKDOWN 0, 0 | |
| %12:fp64bit = LZDR | |
| $f0d = COPY %12 | |
| CallBRASL &fmod, killed $f0d, undef $f2d, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit-def $f0d | |
| ADJCALLSTACKUP 0, 0 | |
| KILL killed $f0d | |
| bb.2: | |
| %17:gr64bit = VLGVH %11, $noreg, 0 | |
| %19:gr32bit = LHR %17.subreg_l32 | |
| undef %20.subreg_l64:gr128bit = LGHI 0 | |
| %20 = DSGFR %20, %19 | |
| %22:gr64bit = VLGVH %11, $noreg, 3 | |
| %24:gr32bit = LHR %22.subreg_l32 | |
| undef %25.subreg_l64:gr128bit = LGHI 0 | |
| %25 = DSGFR %25, %24 | |
| %31:gr64bit = VLGVH %11, $noreg, 1 | |
| %33:gr32bit = LHR %31.subreg_l32 | |
| undef %34.subreg_l64:gr128bit = LGHI 0 | |
| %34 = DSGFR %34, %33 | |
| %37:gr64bit = VLGVH %11, $noreg, 2 | |
| %39:gr32bit = LHR %37.subreg_l32 | |
| undef %40.subreg_l64:gr128bit = LGHI 0 | |
| %40 = DSGFR %40, %39 | |
| CHIMux %43, 0, implicit-def $cc | |
| BRC 14, 6, %bb.2, implicit killed $cc | |
| J %bb.3 | |
| bb.3: | |
| WFCDB undef %46:vr64bit, %45, implicit-def $cc, implicit $fpc | |
| %48:gr32bit = IPM implicit killed $cc | |
| %48 = AFIMux %48, 268435456, implicit-def dead $cc | |
| %6:grx32bit = RISBMux undef %6, %48, 31, 159, 35 | |
| WFCDB undef %50:vr64bit, %45, implicit-def $cc, implicit $fpc | |
| BRC 15, 6, %bb.1, implicit killed $cc | |
| J %bb.4 | |
| bb.4: | |
| %36:vr128bit = VLVGP %25.subreg_l64, %25.subreg_l64 | |
| %36 = VLVGH %36, %20.subreg_l32, $noreg, 0 | |
| %36 = VLVGH %36, %34.subreg_l32, $noreg, 1 | |
| dead %36 = VLVGH %36, %40.subreg_l32, $noreg, 2 | |
| %4:gr64bit = LG undef %42:addr64bit, 0, $noreg :: (load (s64) from `ptr undef`) | |
| undef %57.subreg_h64:gr128bit = LLILL 0 | |
| undef %66.subreg_h64:gr128bit = LLILL 0 | |
| undef %79.subreg_h64:gr128bit = LLILL 0 | |
| undef %89.subreg_h64:gr128bit = LLILL 0 | |
| %92:grx32bit = LHIMux 0 | |
| bb.5: | |
| bb.6: | |
| %51:gr64bit = VLGVH undef %7:vr128bit, $noreg, 0 | |
| %53:gr32bit = LLHRMux %51.subreg_l32 | |
| %54:gr64bit = VLGVH undef %1:vr128bit, $noreg, 0 | |
| %57.subreg_l32 = LLHRMux %54.subreg_l32 | |
| %58:gr128bit = COPY %57 | |
| %58 = DLR %58, %53 | |
| %60:gr64bit = VLGVH undef %7, $noreg, 3 | |
| %62:gr32bit = LLHRMux %60.subreg_l32 | |
| %63:gr64bit = VLGVH undef %1, $noreg, 3 | |
| %66.subreg_l32 = LLHRMux %63.subreg_l32 | |
| %67:gr128bit = COPY %66 | |
| %67 = DLR %67, %62 | |
| %73:gr64bit = VLGVH undef %7, $noreg, 1 | |
| %75:gr32bit = LLHRMux %73.subreg_l32 | |
| %76:gr64bit = VLGVH undef %1, $noreg, 1 | |
| %79.subreg_l32 = LLHRMux %76.subreg_l32 | |
| %80:gr128bit = COPY %79 | |
| %80 = DLR %80, %75 | |
| %83:gr64bit = VLGVH undef %7, $noreg, 2 | |
| %85:gr32bit = LLHRMux %83.subreg_l32 | |
| %86:gr64bit = VLGVH undef %1, $noreg, 2 | |
| %89.subreg_l32 = LLHRMux %86.subreg_l32 | |
| %90:gr128bit = COPY %89 | |
| %90 = DLR %90, %85 | |
| CHIMux %92, 0, implicit-def $cc | |
| BRC 14, 6, %bb.7, implicit killed $cc | |
| J %bb.6 | |
| bb.7: | |
| CGHI undef %93:gr64bit, 0, implicit-def $cc | |
| %96:gr32bit = IPM implicit killed $cc | |
| CGHI undef %97:gr64bit, 0, implicit-def $cc | |
| BRC 14, 6, %bb.6, implicit killed $cc | |
| bb.8: | |
| CHIMux %6, 0, implicit-def $cc | |
| %10:gr64bit = LLILL 41639 | |
| dead %10 = LOCGR %10, %4, 14, 6, implicit killed $cc | |
| CHIMux %92, 0, implicit-def $cc | |
| BRC 14, 6, %bb.5, implicit killed $cc | |
| J %bb.9 | |
| bb.9: | |
| %82:vr128bit = VLVGP %67.subreg_h64, %67.subreg_h64 | |
| %82 = VLVGH %82, %58.subreg_l32, $noreg, 0 | |
| %82 = VLVGH %82, %80.subreg_l32, $noreg, 1 | |
| dead %82 = VLVGH %82, %90.subreg_l32, $noreg, 2 | |
| %96 = AFIMux %96, 1879048192, implicit-def dead $cc | |
| %96 = SRL %96, $noreg, 31 | |
| dead %11 = VLVGF %11, %96, $noreg, 1 | |
| %100:grx32bit = LHIMux 0 | |
| bb.10: | |
| CHIMux %100, 0, implicit-def $cc | |
| BRC 14, 6, %bb.10, implicit killed $cc | |
| J %bb.11 | |
| bb.11: | |
| Return | |
| ... |