brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.3 KiB · cd8f14b Raw
146 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -run-pass register-coalescer %s -systemz-subreg-liveness -O3 -mtriple s390x-ibm-linux -mcpu z13 -o - | FileCheck %s3#4# When the coalescing tries to coalesce `%20 = COPY %18`,5# %18 has been coalesced all the way up to %15 = ROSBG.6# ROSBG has tied operands and can be commuted, thus it7# maybe possible to swap the arguments of ROSBG to coalesce8# this copy. That's what the coalescer attempts.9#10# This used to produce an assertion failure in the coalescer,11# because this particular coalescing trick is used only on12# full copy. Therefore we were asserting that all the subranges13# at the point of the copy had a value number.14# This is actually not true in that example, because %18 is15# only partial defined before being fully copied.16#17# PR40215.18 19 20# The coalescer should have been able to swap the operands of21# the OR, hence eliminating the copy of %20 and %18.22# This is also visible here because the ROSBG operand was LHS23# before the coalescer, now it is RHS.24---25name:            main26alignment:       1627tracksRegLiveness: true28body:             |29  ; CHECK-LABEL: name: main30  ; CHECK: bb.0:31  ; CHECK-NEXT:   successors: %bb.1(0x80000000)32  ; CHECK-NEXT: {{  $}}33  ; CHECK-NEXT:   [[LGHI:%[0-9]+]]:addr64bit = LGHI -3034  ; CHECK-NEXT:   [[LHIMux:%[0-9]+]]:grx32bit = LHIMux 135  ; CHECK-NEXT:   [[LHIMux1:%[0-9]+]]:grx32bit = LHIMux 036  ; CHECK-NEXT:   undef [[DEF:%[0-9]+]].subreg_l32:gr64bit = IMPLICIT_DEF37  ; CHECK-NEXT: {{  $}}38  ; CHECK-NEXT: bb.1:39  ; CHECK-NEXT:   successors: %bb.3(0x00000001), %bb.4(0x7fffffff)40  ; CHECK-NEXT: {{  $}}41  ; CHECK-NEXT:   CHIMux [[LHIMux]], 0, implicit-def $cc42  ; CHECK-NEXT:   BRC 14, 6, %bb.3, implicit killed $cc43  ; CHECK-NEXT:   J %bb.444  ; CHECK-NEXT: {{  $}}45  ; CHECK-NEXT: bb.2:46  ; CHECK-NEXT:   successors:47  ; CHECK-NEXT: {{  $}}48  ; CHECK-NEXT:   STMux [[DEF]].subreg_l32, undef %8:addr64bit, 0, $noreg :: (store (s32) into `ptr undef`)49  ; CHECK-NEXT: {{  $}}50  ; CHECK-NEXT: bb.3:51  ; CHECK-NEXT:   successors:52  ; CHECK-NEXT: {{  $}}53  ; CHECK-NEXT: bb.4:54  ; CHECK-NEXT:   successors: %bb.5(0x30000000), %bb.6(0x50000000)55  ; CHECK-NEXT: {{  $}}56  ; CHECK-NEXT:   [[LAY:%[0-9]+]]:gr64bit = LAY [[LGHI]], 19838, $noreg57  ; CHECK-NEXT:   [[LAY1:%[0-9]+]]:gr64bit = LAY [[LGHI]], 19840, $noreg58  ; CHECK-NEXT:   [[LAY2:%[0-9]+]]:gr64bit = LAY [[LGHI]], 19844, $noreg59  ; CHECK-NEXT:   [[LAY2:%[0-9]+]]:gr64bit = OGR [[LAY2]], [[LAY]], implicit-def dead $cc60  ; CHECK-NEXT:   undef [[AHIMuxK:%[0-9]+]].subreg_l32:gr64bit = AHIMuxK [[LGHI]].subreg_l32, 19843, implicit-def dead $cc61  ; CHECK-NEXT:   [[AHIMuxK:%[0-9]+]]:gr64bit = ROSBG [[AHIMuxK]], [[LAY2]], 32, 63, 0, implicit-def dead $cc62  ; CHECK-NEXT:   [[DEF:%[0-9]+]].subreg_l32:gr64bit = OR [[DEF]].subreg_l32, [[AHIMuxK]].subreg_l32, implicit-def dead $cc63  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:gr64bit = ROSBG [[DEF]], [[LAY1]], 32, 63, 0, implicit-def dead $cc64  ; CHECK-NEXT:   CHIMux [[LHIMux1]], 0, implicit-def $cc65  ; CHECK-NEXT:   BRC 14, 6, %bb.6, implicit killed $cc66  ; CHECK-NEXT:   J %bb.567  ; CHECK-NEXT: {{  $}}68  ; CHECK-NEXT: bb.5:69  ; CHECK-NEXT:   successors: %bb.6(0x80000000)70  ; CHECK-NEXT: {{  $}}71  ; CHECK-NEXT: bb.6:72  ; CHECK-NEXT:   successors: %bb.2(0x00000001), %bb.7(0x7fffffff)73  ; CHECK-NEXT: {{  $}}74  ; CHECK-NEXT:   [[LGHI:%[0-9]+]]:addr64bit = nuw nsw LA [[LGHI]], 6, $noreg75  ; CHECK-NEXT:   CGHI [[LGHI]], 0, implicit-def $cc76  ; CHECK-NEXT:   BRC 14, 8, %bb.2, implicit killed $cc77  ; CHECK-NEXT: {{  $}}78  ; CHECK-NEXT: bb.7:79  ; CHECK-NEXT:   successors: %bb.1(0x80000000)80  ; CHECK-NEXT: {{  $}}81  ; CHECK-NEXT:   J %bb.182  bb.0:83    %6:gr64bit = LGHI -3084    %8:grx32bit = LHIMux 185    %21:grx32bit = LHIMux 086    %23:addr64bit = COPY killed %687    %24:gr32bit = IMPLICIT_DEF88 89  bb.1:90    successors: %bb.3(0x00000001), %bb.4(0x7fffffff)91 92    %1:gr32bit = COPY killed %2493    %0:addr64bit = COPY killed %2394    CHIMux %8, 0, implicit-def $cc95    BRC 14, 6, %bb.3, implicit killed $cc96    J %bb.497 98  bb.2:99    successors:100 101    STMux killed %4, undef %22:addr64bit, 0, $noreg :: (store (s32) into `ptr undef`)102 103  bb.3:104    successors:105 106 107  bb.4:108    successors: %bb.5(0x30000000), %bb.6(0x50000000)109 110    %2:gr64bit = LAY %0, 19838, $noreg111    %3:gr64bit = LAY %0, 19840, $noreg112    %9:gr64bit = LAY %0, 19844, $noreg113    %10:gr64bit = COPY killed %9114    %10:gr64bit = OGR %10, killed %2, implicit-def dead $cc115    %11:gr32bit = COPY %0.subreg_l32116    %12:gr32bit = AHIMuxK killed %11, 19843, implicit-def dead $cc117    undef %13.subreg_l32:gr64bit = COPY killed %12118    %15:gr64bit = COPY killed %13119    %15:gr64bit = ROSBG %15, killed %10, 32, 63, 0, implicit-def dead $cc120    %16:gr32bit = COPY killed %15.subreg_l32121    %17:gr32bit = COPY killed %16122    %17:gr32bit = OR %17, killed %1, implicit-def dead $cc123    undef %18.subreg_l32:gr64bit = COPY killed %17124    %20:gr64bit = COPY killed %18125    %20:gr64bit = ROSBG %20, killed %3, 32, 63, 0, implicit-def dead $cc126    CHIMux %21, 0, implicit-def $cc127    BRC 14, 6, %bb.6, implicit killed $cc128    J %bb.5129 130  bb.5:131 132  bb.6:133    successors: %bb.2(0x00000001), %bb.7(0x7fffffff)134 135    %4:grx32bit = COPY killed %20.subreg_l32136    %5:gr64bit = nuw nsw LA killed %0, 6, $noreg137    CGHI %5, 0, implicit-def $cc138    BRC 14, 8, %bb.2, implicit killed $cc139 140  bb.7:141    %23:addr64bit = COPY killed %5142    %24:gr32bit = COPY killed %4143    J %bb.1144 145...146