133 lines · plain
1# RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx803 -run-pass=register-coalescer -o - %s | FileCheck -check-prefix=GCN %s2 3# With one version of the D48102 fix, this test failed with4# Assertion failed: (ValNo && "CopyMI input register not live"), function reMaterializeTrivialDef, file ../lib/CodeGen/RegisterCoalescer.cpp, line 1107.5 6# GCN: {{^body}}7 8--- |9 target triple = "amdgcn--amdpal"10 11 define amdgpu_cs void @_amdgpu_cs_main(<3 x i32>) #0 {12 ret void13 }14 15 attributes #0 = { nounwind "target-cpu"="gfx803" }16...17 18---19name: _amdgpu_cs_main20tracksRegLiveness: true21body: |22 bb.0:23 successors: %bb.1(0x40000000), %bb.2(0x40000000)24 %0:vgpr_32 = nofpexcept V_MUL_F32_e32 0, undef %1:vgpr_32, implicit $mode, implicit $exec25 %2:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 killed %0, implicit $mode, implicit $exec26 %3:vgpr_32 = nofpexcept V_CVT_F32_I32_e32 killed %2, implicit $mode, implicit $exec27 %4:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 killed %3, implicit $mode, implicit $exec28 %5:vgpr_32 = V_LSHRREV_B32_e32 4, killed %4, implicit $exec29 S_CBRANCH_SCC0 %bb.2, implicit undef $scc30 31 bb.1:32 successors: %bb.5(0x80000000)33 undef %6.sub1:vreg_128 = COPY killed %534 %7:vreg_128 = COPY killed %635 S_BRANCH %bb.536 37 bb.2:38 successors: %bb.3(0x40000000), %bb.4(0x40000000)39 S_CBRANCH_SCC0 %bb.4, implicit undef $scc40 41 bb.3:42 successors: %bb.5(0x80000000)43 %8:sreg_32_xm0 = S_MOV_B32 044 undef %9.sub0:sgpr_128 = COPY %845 %9.sub1:sgpr_128 = COPY %846 %9.sub2:sgpr_128 = COPY %847 %9.sub3:sgpr_128 = COPY killed %848 %10:vreg_128 = COPY killed %949 %7:vreg_128 = COPY killed %1050 S_BRANCH %bb.551 52 bb.4:53 successors: %bb.5(0x80000000)54 %11:sreg_32_xm0 = S_MOV_B32 055 undef %12.sub0:sgpr_128 = COPY %1156 %12.sub1:sgpr_128 = COPY %1157 %12.sub2:sgpr_128 = COPY %1158 %12.sub3:sgpr_128 = COPY killed %1159 %13:sgpr_128 = COPY killed %1260 %14:vreg_128 = COPY killed %1361 %7:vreg_128 = COPY killed %1462 63 bb.5:64 successors: %bb.8(0x40000000), %bb.6(0x40000000)65 %15:vreg_128 = COPY killed %766 S_CBRANCH_SCC0 %bb.8, implicit undef $scc67 68 bb.6:69 successors: %bb.7(0x80000000)70 %16:vreg_128 = COPY killed %1571 72 bb.7:73 successors: %bb.14(0x80000000)74 %17:vreg_128 = COPY killed %1675 S_BRANCH %bb.1476 77 bb.8:78 successors: %bb.9(0x40000000), %bb.11(0x40000000)79 %18:vgpr_32 = V_MUL_LO_I32_e64 %15.sub1, target-flags(amdgpu-gotprel32-lo) 7, implicit $exec80 S_CBRANCH_SCC1 %bb.11, implicit undef $scc81 S_BRANCH %bb.982 83 bb.9:84 successors: %bb.10(0x80000000)85 %19:vreg_128 = BUFFER_LOAD_FORMAT_XYZW_IDXEN killed %18, undef %20:sgpr_128, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s128) from constant-pool, align 1, addrspace 4)86 %21:sreg_64 = V_CMP_NE_U32_e64 target-flags(amdgpu-gotprel) 0, killed %19.sub0, implicit $exec87 %22:sreg_64 = COPY $exec, implicit-def $exec88 %23:sreg_64 = S_AND_B64 %22, %21, implicit-def dead $scc89 $exec = S_MOV_B64_term killed %2390 91 bb.10:92 successors: %bb.12(0x80000000)93 $exec = S_OR_B64 $exec, killed %22, implicit-def $scc94 S_BRANCH %bb.1295 96 bb.11:97 successors: %bb.13(0x80000000)98 %24:vreg_128 = COPY killed %1599 %24.sub0:vreg_128 = COPY undef %18100 S_BRANCH %bb.13101 102 bb.12:103 successors: %bb.11(0x80000000)104 S_BRANCH %bb.11105 106 bb.13:107 successors: %bb.7(0x80000000)108 %16:vreg_128 = COPY killed %24109 S_BRANCH %bb.7110 111 bb.14:112 successors: %bb.15(0x80000000)113 S_CBRANCH_SCC1 %bb.15, implicit undef $scc114 S_BRANCH %bb.15115 116 bb.15:117 undef %25.sub2:vreg_128 = COPY killed %17.sub2118 %26:sreg_32_xm0 = S_MOV_B32 0119 undef %27.sub0:sgpr_256 = COPY %26120 %27.sub1:sgpr_256 = COPY %26121 %27.sub2:sgpr_256 = COPY %26122 %27.sub3:sgpr_256 = COPY %26123 %27.sub4:sgpr_256 = COPY %26124 %27.sub5:sgpr_256 = COPY %26125 %27.sub6:sgpr_256 = COPY %26126 %27.sub7:sgpr_256 = COPY killed %26127 %28:vgpr_32 = IMAGE_LOAD_V1_V4 killed %25, killed %27, 2, -1, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s128) from constant-pool, addrspace 4)128 %29:vgpr_32 = nofpexcept V_ADD_F32_e32 0, killed %28, implicit $mode, implicit $exec129 $m0 = S_MOV_B32 -1130 DS_WRITE_B32 undef %30:vgpr_32, killed %29, 0, 0, implicit $m0, implicit $exec :: (store (s32) into `ptr addrspace(3) poison`, addrspace 3)131 S_ENDPGM 0132...133