132 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 22# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 \3# RUN: -start-before=greedy,0 -stop-after=virtregrewriter,1 -verify-regalloc -o - %s | FileCheck %s4 5# This hit an assert when identifying snippet copy bundles from6# running off the end of the block due to using7# MachineBasicBlock::iterator instead of8# MachineBasicBlock::instr_iterator.9 10--- |11 12 define amdgpu_kernel void @kernel() #0 {13 bb:14 ret void15 }16 17 attributes #0 = { "amdgpu-calls" "amdgpu-waves-per-eu"="10,10" "target-cpu"="gfx900" }18 19...20---21name: kernel22tracksRegLiveness: true23frameInfo:24 adjustsStack: true25 hasCalls: true26machineFunctionInfo:27 isEntryFunction: true28 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'29 stackPtrOffsetReg: '$sgpr32'30 occupancy: 831body: |32 ; CHECK-LABEL: name: kernel33 ; CHECK: bb.0:34 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)35 ; CHECK-NEXT: liveins: $sgpr14, $sgpr15, $sgpr16, $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr1136 ; CHECK-NEXT: {{ $}}37 ; CHECK-NEXT: dead [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF38 ; CHECK-NEXT: renamable $sgpr35 = IMPLICIT_DEF39 ; CHECK-NEXT: renamable $sgpr38_sgpr39 = COPY undef $sgpr8_sgpr940 ; CHECK-NEXT: renamable $sgpr36_sgpr37 = IMPLICIT_DEF41 ; CHECK-NEXT: renamable $sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55 = S_LOAD_DWORDX8_IMM renamable $sgpr38_sgpr39, 0, 0 :: (dereferenceable invariant load (s256), align 16, addrspace 4)42 ; CHECK-NEXT: dead renamable $sgpr4 = S_LOAD_DWORD_IMM renamable $sgpr38_sgpr39, 48, 0 :: (dereferenceable invariant load (s32), align 16, addrspace 4)43 ; CHECK-NEXT: dead renamable $sgpr4_sgpr5 = S_LOAD_DWORDX2_IMM renamable $sgpr48_sgpr49, 0, 0 :: (invariant load (s64), align 16, addrspace 4)44 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr3245 ; CHECK-NEXT: $vgpr1 = COPY renamable $sgpr5546 ; CHECK-NEXT: dead $sgpr30_sgpr31 = SI_CALL undef renamable $sgpr4_sgpr5, 0, csr_amdgpu, implicit undef $sgpr15, implicit $vgpr31, implicit $sgpr0_sgpr1_sgpr2_sgpr347 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr3248 ; CHECK-NEXT: $vcc = COPY renamable $sgpr34_sgpr3549 ; CHECK-NEXT: S_CBRANCH_VCCZ %bb.2, implicit undef $vcc50 ; CHECK-NEXT: {{ $}}51 ; CHECK-NEXT: bb.1:52 ; CHECK-NEXT: successors: %bb.3(0x80000000)53 ; CHECK-NEXT: liveins: $sgpr36_sgpr37, $sgpr38_sgpr39, $sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55:0x000000000000FC0054 ; CHECK-NEXT: {{ $}}55 ; CHECK-NEXT: renamable $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11 = S_LOAD_DWORDX8_IMM renamable $sgpr38_sgpr39, 56, 0 :: (dereferenceable invariant load (s256), align 8, addrspace 4)56 ; CHECK-NEXT: S_BRANCH %bb.357 ; CHECK-NEXT: {{ $}}58 ; CHECK-NEXT: bb.2:59 ; CHECK-NEXT: successors: %bb.3(0x80000000)60 ; CHECK-NEXT: liveins: $sgpr36_sgpr37, $sgpr38_sgpr39, $sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55:0x000000000000FC0061 ; CHECK-NEXT: {{ $}}62 ; CHECK-NEXT: renamable $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11 = S_LOAD_DWORDX8_IMM renamable $sgpr38_sgpr39, 56, 0 :: (dereferenceable invariant load (s256), align 8, addrspace 4)63 ; CHECK-NEXT: S_CMP_LG_U64 renamable $sgpr4_sgpr5, 0, implicit-def $scc64 ; CHECK-NEXT: {{ $}}65 ; CHECK-NEXT: bb.3:66 ; CHECK-NEXT: successors: %bb.5(0x40000000), %bb.4(0x40000000)67 ; CHECK-NEXT: liveins: $sgpr36_sgpr37, $sgpr38_sgpr39, $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11:0x00000000000003F0, $sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55:0x000000000000FC0068 ; CHECK-NEXT: {{ $}}69 ; CHECK-NEXT: S_CBRANCH_VCCZ %bb.5, implicit undef $vcc70 ; CHECK-NEXT: {{ $}}71 ; CHECK-NEXT: bb.4:72 ; CHECK-NEXT: successors: %bb.5(0x80000000)73 ; CHECK-NEXT: liveins: $sgpr36_sgpr37, $sgpr38_sgpr39, $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11:0x00000000000003F0, $sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55:0x000000000000FC0074 ; CHECK-NEXT: {{ $}}75 ; CHECK-NEXT: S_CMP_EQ_U32 renamable $sgpr8, 0, implicit-def $scc76 ; CHECK-NEXT: {{ $}}77 ; CHECK-NEXT: bb.5:78 ; CHECK-NEXT: liveins: $sgpr36_sgpr37, $sgpr38_sgpr39, $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11:0x00000000000000F0, $sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55:0x000000000000FC0079 ; CHECK-NEXT: {{ $}}80 ; CHECK-NEXT: dead renamable $sgpr4_sgpr5 = S_LOAD_DWORDX2_IMM killed renamable $sgpr38_sgpr39, 40, 0 :: (dereferenceable invariant load (s64), addrspace 4)81 ; CHECK-NEXT: GLOBAL_STORE_DWORD_SADDR undef [[DEF]], undef [[DEF]], killed renamable $sgpr6_sgpr7, 0, 0, implicit $exec :: (store (s32), addrspace 1)82 ; CHECK-NEXT: GLOBAL_STORE_DWORD_SADDR undef [[DEF]], undef [[DEF]], renamable $sgpr54_sgpr55, 0, 0, implicit $exec :: (store (s32), addrspace 1)83 ; CHECK-NEXT: dead [[COPY:%[0-9]+]]:vgpr_32 = COPY killed renamable $sgpr5384 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr3285 ; CHECK-NEXT: $sgpr6_sgpr7 = COPY killed renamable $sgpr36_sgpr3786 ; CHECK-NEXT: renamable $sgpr10_sgpr11 = IMPLICIT_DEF87 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr3288 ; CHECK-NEXT: S_ENDPGM 089 bb.0:90 liveins: $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr14, $sgpr15, $sgpr1691 92 %0:sgpr_64 = IMPLICIT_DEF93 %1:vgpr_32 = IMPLICIT_DEF94 undef %2.sub1:sreg_64 = IMPLICIT_DEF95 %3:sgpr_64 = COPY undef $sgpr8_sgpr996 %4:sgpr_64 = IMPLICIT_DEF97 %5:sgpr_256 = S_LOAD_DWORDX8_IMM %3, 0, 0 :: (dereferenceable invariant load (s256), align 16, addrspace 4)98 %6:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM %3, 48, 0 :: (dereferenceable invariant load (s32), align 16, addrspace 4)99 %7:sgpr_256 = S_LOAD_DWORDX8_IMM %3, 56, 0 :: (dereferenceable invariant load (s256), align 8, addrspace 4)100 %8:sreg_64_xexec = S_LOAD_DWORDX2_IMM %5.sub0_sub1, 0, 0 :: (invariant load (s64), align 16, addrspace 4)101 ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32102 $vgpr1 = COPY %5.sub7103 dead $sgpr30_sgpr31 = SI_CALL undef %8, 0, csr_amdgpu, implicit undef $sgpr15, implicit $vgpr31, implicit $sgpr0_sgpr1_sgpr2_sgpr3104 ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32105 $vcc = COPY %2106 S_CBRANCH_VCCZ %bb.2, implicit undef $vcc107 108 bb.1:109 S_BRANCH %bb.3110 111 bb.2:112 S_CMP_LG_U64 %7.sub0_sub1, 0, implicit-def $scc113 114 bb.3:115 S_CBRANCH_VCCZ %bb.5, implicit undef $vcc116 117 bb.4:118 S_CMP_EQ_U32 %7.sub4, 0, implicit-def $scc119 120 bb.5:121 %9:sreg_64_xexec = S_LOAD_DWORDX2_IMM %3, 40, 0 :: (dereferenceable invariant load (s64), addrspace 4)122 GLOBAL_STORE_DWORD_SADDR undef %1, undef %1, %7.sub2_sub3, 0, 0, implicit $exec :: (store (s32), addrspace 1)123 GLOBAL_STORE_DWORD_SADDR undef %1, undef %1, %5.sub6_sub7, 0, 0, implicit $exec :: (store (s32), addrspace 1)124 %10:vgpr_32 = COPY %5.sub5125 ADJCALLSTACKUP 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32126 $sgpr6_sgpr7 = COPY %4127 $sgpr10_sgpr11 = COPY %0128 ADJCALLSTACKDOWN 0, 0, implicit-def dead $scc, implicit-def $sgpr32, implicit $sgpr32129 S_ENDPGM 0130 131...132