1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs %s -o - | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs %s -o - | FileCheck %s 4 5--- 6name: copy_s32_vgpr_to_vgpr 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $vgpr0 12 ; CHECK-LABEL: name: copy_s32_vgpr_to_vgpr 13 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 14 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 15 %0:_(s32) = COPY $vgpr0 16 $vgpr0 = COPY %0 17 18... 19 20--- 21name: copy_s32_sgpr_to_sgpr 22legalized: true 23 24body: | 25 bb.0: 26 liveins: $sgpr0 27 ; CHECK-LABEL: name: copy_s32_sgpr_to_sgpr 28 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 29 ; CHECK: $sgpr0 = COPY [[COPY]](s32) 30 %0:_(s32) = COPY $sgpr0 31 $sgpr0 = COPY %0 32 33... 34 35--- 36name: copy_s32_sgpr_to_vgpr 37legalized: true 38 39body: | 40 bb.0: 41 liveins: $sgpr0 42 ; CHECK-LABEL: name: copy_s32_sgpr_to_vgpr 43 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 44 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 45 %0:_(s32) = COPY $sgpr0 46 $vgpr0 = COPY %0 47 48... 49 50--- 51name: copy_s32_vgpr_to_agpr 52legalized: true 53 54body: | 55 bb.0: 56 liveins: $vgpr0 57 ; CHECK-LABEL: name: copy_s32_vgpr_to_agpr 58 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 59 ; CHECK: $agpr0 = COPY [[COPY]](s32) 60 %0:_(s32) = COPY $vgpr0 61 $agpr0 = COPY %0 62 63... 64 65--- 66name: copy_s32_sgpr_to_agpr 67legalized: true 68 69body: | 70 bb.0: 71 liveins: $sgpr0 72 ; CHECK-LABEL: name: copy_s32_sgpr_to_agpr 73 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 74 ; CHECK: $agpr0 = COPY [[COPY]](s32) 75 %0:_(s32) = COPY $sgpr0 76 $agpr0 = COPY %0 77 78... 79 80--- 81name: copy_s32_agpr_to_vgpr 82legalized: true 83 84body: | 85 bb.0: 86 liveins: $agpr0 87 ; CHECK-LABEL: name: copy_s32_agpr_to_vgpr 88 ; CHECK: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 89 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 90 %0:_(s32) = COPY $agpr0 91 $vgpr0 = COPY %0 92 93... 94 95--- 96name: copy_s32_agpr_to_agpr 97legalized: true 98 99body: | 100 bb.0: 101 liveins: $agpr0 102 ; CHECK-LABEL: name: copy_s32_agpr_to_agpr 103 ; CHECK: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 104 ; CHECK: $agpr0 = COPY [[COPY]](s32) 105 %0:_(s32) = COPY $agpr0 106 $agpr0 = COPY %0 107 108... 109 110--- 111name: copy_s1_sgpr_to_vcc_preassigned 112legalized: true 113 114body: | 115 bb.0: 116 liveins: $sgpr0 117 ; CHECK-LABEL: name: copy_s1_sgpr_to_vcc_preassigned 118 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 119 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 120 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 121 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1) 122 %0:sgpr(s32) = COPY $sgpr0 123 %1:sgpr(s1) = G_TRUNC %0 124 %2:vcc(s1) = COPY %1 125 S_ENDPGM 0, implicit %2 126... 127 128--- 129name: copy_s1_vgpr_to_vcc_preassigned 130legalized: true 131 132body: | 133 bb.0: 134 liveins: $vgpr0 135 ; CHECK-LABEL: name: copy_s1_vgpr_to_vcc_preassigned 136 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 137 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 138 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 139 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1) 140 %0:vgpr(s32) = COPY $vgpr0 141 %1:vgpr(s1) = G_TRUNC %0 142 %2:vcc(s1) = COPY %1 143 S_ENDPGM 0, implicit %2 144... 145 146--- 147name: copy_s1_sgpr_to_vcc 148legalized: true 149 150body: | 151 bb.0: 152 liveins: $sgpr0 153 ; CHECK-LABEL: name: copy_s1_sgpr_to_vcc 154 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 155 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 156 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 157 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1) 158 %0:_(s32) = COPY $sgpr0 159 %1:_(s1) = G_TRUNC %0 160 %2:vcc(s1) = COPY %1 161 S_ENDPGM 0, implicit %2 162... 163 164 165--- 166name: copy_s1_vgpr_to_vcc 167legalized: true 168 169body: | 170 bb.0: 171 liveins: $vgpr0 172 ; CHECK-LABEL: name: copy_s1_vgpr_to_vcc 173 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 174 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 175 ; CHECK: [[COPY1:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 176 ; CHECK: S_ENDPGM 0, implicit [[COPY1]](s1) 177 %0:_(s32) = COPY $vgpr0 178 %1:_(s1) = G_TRUNC %0 179 %2:vcc(s1) = COPY %1 180 S_ENDPGM 0, implicit %2 181... 182