|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 |
| 2 | +# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -simplify-mir -start-before=greedy,2 -stress-regalloc=3 -stop-after=postrapseudos -o - -verify-regalloc %s | FileCheck %s |
| 3 | + |
| 4 | +# Compare results of using V_MOV_B32 vs. AV_MOV_B32_IMM_PSEUDO during |
| 5 | +# allocation. |
| 6 | + |
| 7 | +--- |
| 8 | +name: av_mov_b32_split |
| 9 | +tracksRegLiveness: true |
| 10 | +machineFunctionInfo: |
| 11 | + isEntryFunction: true |
| 12 | + scratchRSrcReg: '$sgpr72_sgpr73_sgpr74_sgpr75' |
| 13 | + stackPtrOffsetReg: '$sgpr32' |
| 14 | + occupancy: 7 |
| 15 | +body: | |
| 16 | + bb.0: |
| 17 | + liveins: $vgpr0, $sgpr4_sgpr5 |
| 18 | +
|
| 19 | + ; CHECK-LABEL: name: av_mov_b32_split |
| 20 | + ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2, $sgpr4_sgpr5 |
| 21 | + ; CHECK-NEXT: {{ $}} |
| 22 | + ; CHECK-NEXT: renamable $agpr0 = V_ACCVGPR_WRITE_B32_e64 0, implicit $exec |
| 23 | + ; CHECK-NEXT: renamable $agpr1 = V_ACCVGPR_WRITE_B32_e64 1, implicit $exec |
| 24 | + ; CHECK-NEXT: renamable $agpr2 = V_ACCVGPR_WRITE_B32_e64 2, implicit $exec |
| 25 | + ; CHECK-NEXT: $vgpr0 = V_ACCVGPR_READ_B32_e64 killed $agpr0, implicit $exec |
| 26 | + ; CHECK-NEXT: renamable $agpr0 = V_ACCVGPR_WRITE_B32_e64 3, implicit $exec |
| 27 | + ; CHECK-NEXT: $vgpr1 = V_ACCVGPR_READ_B32_e64 killed $agpr0, implicit $exec |
| 28 | + ; CHECK-NEXT: renamable $agpr0 = V_ACCVGPR_WRITE_B32_e64 4, implicit $exec |
| 29 | + ; CHECK-NEXT: $vgpr2 = V_ACCVGPR_READ_B32_e64 killed $agpr0, implicit $exec |
| 30 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 31 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr0 |
| 32 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr1 |
| 33 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr2 |
| 34 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr1, implicit $exec |
| 35 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr0 |
| 36 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr2, implicit $exec |
| 37 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr0 |
| 38 | + %0:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 0, implicit $exec |
| 39 | + %1:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 1, implicit $exec |
| 40 | + %2:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 2, implicit $exec |
| 41 | + %3:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 3, implicit $exec |
| 42 | + %4:vgpr_32 = AV_MOV_B32_IMM_PSEUDO 4, implicit $exec |
| 43 | +
|
| 44 | + %5:agpr_32 = COPY %0 |
| 45 | + %6:agpr_32 = COPY %1 |
| 46 | + %7:agpr_32 = COPY %2 |
| 47 | + %8:agpr_32 = COPY %3 |
| 48 | + %9:agpr_32 = COPY %4 |
| 49 | +
|
| 50 | + S_NOP 0, implicit %5 |
| 51 | + S_NOP 0, implicit %6 |
| 52 | + S_NOP 0, implicit %7 |
| 53 | + S_NOP 0, implicit %8 |
| 54 | + S_NOP 0, implicit %9 |
| 55 | +
|
| 56 | +... |
| 57 | + |
| 58 | +--- |
| 59 | +name: v_mov_b32_split |
| 60 | +tracksRegLiveness: true |
| 61 | +machineFunctionInfo: |
| 62 | + isEntryFunction: true |
| 63 | + scratchRSrcReg: '$sgpr72_sgpr73_sgpr74_sgpr75' |
| 64 | + stackPtrOffsetReg: '$sgpr32' |
| 65 | + occupancy: 7 |
| 66 | +body: | |
| 67 | + bb.0: |
| 68 | + liveins: $vgpr0, $sgpr4_sgpr5 |
| 69 | +
|
| 70 | + ; CHECK-LABEL: name: v_mov_b32_split |
| 71 | + ; CHECK: liveins: $vgpr0, $vgpr3, $vgpr4, $vgpr5, $sgpr4_sgpr5 |
| 72 | + ; CHECK-NEXT: {{ $}} |
| 73 | + ; CHECK-NEXT: renamable $vgpr0 = V_MOV_B32_e32 0, implicit $exec |
| 74 | + ; CHECK-NEXT: renamable $vgpr1 = V_MOV_B32_e32 1, implicit $exec |
| 75 | + ; CHECK-NEXT: renamable $vgpr2 = V_MOV_B32_e32 2, implicit $exec |
| 76 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec, implicit $exec |
| 77 | + ; CHECK-NEXT: $vgpr3 = V_ACCVGPR_READ_B32_e64 killed $agpr0, implicit $exec |
| 78 | + ; CHECK-NEXT: $agpr1 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr1, implicit $exec, implicit $exec |
| 79 | + ; CHECK-NEXT: $agpr2 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr2, implicit $exec, implicit $exec |
| 80 | + ; CHECK-NEXT: renamable $vgpr0 = V_MOV_B32_e32 3, implicit $exec |
| 81 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec, implicit $exec |
| 82 | + ; CHECK-NEXT: $vgpr4 = V_ACCVGPR_READ_B32_e64 killed $agpr0, implicit $exec |
| 83 | + ; CHECK-NEXT: renamable $vgpr0 = V_MOV_B32_e32 4, implicit $exec |
| 84 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec, implicit $exec |
| 85 | + ; CHECK-NEXT: $vgpr5 = V_ACCVGPR_READ_B32_e64 killed $agpr0, implicit $exec |
| 86 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr3, implicit $exec |
| 87 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr0 |
| 88 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr1 |
| 89 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr2 |
| 90 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr4, implicit $exec |
| 91 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr0 |
| 92 | + ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr5, implicit $exec |
| 93 | + ; CHECK-NEXT: S_NOP 0, implicit killed renamable $agpr0 |
| 94 | + %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec |
| 95 | + %1:vgpr_32 = V_MOV_B32_e32 1, implicit $exec |
| 96 | + %2:vgpr_32 = V_MOV_B32_e32 2, implicit $exec |
| 97 | + %3:vgpr_32 = V_MOV_B32_e32 3, implicit $exec |
| 98 | + %4:vgpr_32 = V_MOV_B32_e32 4, implicit $exec |
| 99 | +
|
| 100 | + %5:agpr_32 = COPY %0 |
| 101 | + %6:agpr_32 = COPY %1 |
| 102 | + %7:agpr_32 = COPY %2 |
| 103 | + %8:agpr_32 = COPY %3 |
| 104 | + %9:agpr_32 = COPY %4 |
| 105 | +
|
| 106 | + S_NOP 0, implicit %5 |
| 107 | + S_NOP 0, implicit %6 |
| 108 | + S_NOP 0, implicit %7 |
| 109 | + S_NOP 0, implicit %8 |
| 110 | + S_NOP 0, implicit %9 |
| 111 | +
|
| 112 | +... |
| 113 | + |
0 commit comments