brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.9 KiB · c4ef724 Raw
105 lines · plain
1# RUN: llc -mtriple=amdgcn -mcpu=gfx1030 -greedy-regclass-priority-trumps-globalness=0 -start-before greedy -o - %s | FileCheck %s -check-prefixes=GCN,OLD2# RUN: llc -mtriple=amdgcn -mcpu=gfx1030 -greedy-regclass-priority-trumps-globalness=1 -start-before greedy -o - %s | FileCheck %s -check-prefixes=GCN,NEW3 4# At the time of writing -greedy-regclass-priority-trumps-globalness makes a5# significant improvement in the total number of vgprs needed to compile this6# test, from 11 down to 7.7 8# GCN-LABEL: test1:9# OLD: NumVgprs: 11{{$}}10# NEW: NumVgprs: 7{{$}}11---12name: test113tracksRegLiveness: true14body: |15  bb.0:16    successors: %bb.1, %bb.217    liveins: $vgpr0, $vgpr618 19    %6:vgpr_32 = COPY $vgpr620    undef %30.sub0:vreg_128 = COPY $vgpr021    undef %27.sub0:vreg_128 = V_MED3_F32_e64 0, 0, 0, 0, 0, 0, 0, 0, implicit $mode, implicit $exec22    undef %16.sub0:sgpr_256 = S_MOV_B32 023    undef %26.sub1:vreg_64 = V_LSHRREV_B32_e32 1, %6, implicit $exec24    %27.sub1:vreg_128 = COPY %27.sub025    %27.sub2:vreg_128 = COPY %27.sub026    %27.sub3:vreg_128 = COPY %27.sub027    %26.sub0:vreg_64 = V_MOV_B32_e32 1, implicit $exec28    %16.sub1:sgpr_256 = COPY %16.sub029    %16.sub2:sgpr_256 = COPY %16.sub030    %16.sub3:sgpr_256 = COPY %16.sub031    %16.sub4:sgpr_256 = COPY %16.sub032    %16.sub5:sgpr_256 = COPY %16.sub033    %16.sub6:sgpr_256 = COPY %16.sub034    %16.sub7:sgpr_256 = COPY %16.sub035    IMAGE_STORE_V4_V2_gfx10 %27, %26, %16, 0, 1, -1, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable store (s32), addrspace 7)36    S_CBRANCH_SCC1 %bb.2, implicit undef $scc37    S_BRANCH %bb.138 39  bb.1:40    %30.sub1:vreg_128 = V_MOV_B32_e32 0, implicit $exec41    %30.sub2:vreg_128 = COPY %30.sub142    %30.sub3:vreg_128 = COPY %30.sub143    %26.sub1:vreg_64 = COPY %30.sub144    IMAGE_STORE_V4_V2_gfx10 %30, %26, %16, 0, 1, -1, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable store (s32), addrspace 7)45 46  bb.2:47    S_ENDPGM 048...49 50# GCN-LABEL: test2:51# OLD: NumVgprs: 7{{$}}52# NEW: NumVgprs: 11{{$}}53---54name: test255tracksRegLiveness: true56body: |57  bb.0:58    liveins: $vgpr0, $vgpr259 60    %8:vgpr_32 = COPY $vgpr261    %6:vgpr_32 = COPY $vgpr062 63  bb.1:64    successors: %bb.2, %bb.365 66    undef %25.sub0:sgpr_256 = S_MOV_B32 067    %10:vgpr_32 = V_MOV_B32_e32 0, implicit $exec68    %25.sub1:sgpr_256 = COPY %25.sub069    %25.sub2:sgpr_256 = COPY %25.sub070    %25.sub3:sgpr_256 = COPY %25.sub071    %19:vgpr_32 = BUFFER_LOAD_FORMAT_X_IDXEN %10, %25.sub0_sub1_sub2_sub3, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s32))72    %36:vreg_64 = DS_READ2_B32_gfx9 %10, 0, 2, 0, implicit $exec :: (load (s32)), (load (s32))73    %30:vgpr_32 = V_LSHLREV_B32_e32 2, %36.sub0, implicit $exec74    %3:vgpr_32 = V_ADD_U32_e32 %30, %6, implicit $exec75    %4:vgpr_32 = V_ADD_U32_e32 %36.sub1, %8, implicit $exec76    %15:vgpr_32 = V_OR_B32_e32 %4, %3, implicit $exec77    %21:sreg_32_xm0 = V_READFIRSTLANE_B32 %19, implicit $exec78    %17:sreg_32 = V_CMP_EQ_U32_e64 0, %15, implicit $exec79    S_CMP_LG_U32 %21, 0, implicit-def $scc80    %31:sreg_32_xm0_xexec = S_CSELECT_B32 -1, 0, implicit killed $scc81    %23:sreg_32 = S_AND_B32 %31, %17, implicit-def dead $scc82    %5:sreg_32 = COPY $exec_lo, implicit-def $exec_lo83    %37:sreg_32 = S_AND_B32 %5, %23, implicit-def dead $scc84    $exec_lo = S_MOV_B32_term %3785    S_CBRANCH_EXECZ %bb.3, implicit $exec86    S_BRANCH %bb.287 88  bb.2:89    undef %28.sub0:vreg_128 = V_MOV_B32_e32 0, implicit $exec90    %25.sub1:sgpr_256 = COPY %25.sub091    %25.sub2:sgpr_256 = COPY %25.sub092    %25.sub3:sgpr_256 = COPY %25.sub093    %25.sub4:sgpr_256 = COPY %25.sub094    %28.sub1:vreg_128 = COPY %28.sub095    %28.sub2:vreg_128 = COPY %28.sub096    %28.sub3:vreg_128 = COPY %28.sub097    %25.sub5:sgpr_256 = COPY %25.sub098    %25.sub6:sgpr_256 = COPY %25.sub099    %25.sub7:sgpr_256 = COPY %25.sub0100    IMAGE_STORE_V4_V3_nsa_gfx10 %28, %3, %30, %4, %25, 0, 2, -1, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable store (s32))101 102  bb.3:103    S_ENDPGM 0104...105