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 -o - %s | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck %s 4 5--- 6name: concat_vectors_v4s16_ss 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $sgpr0, $sgpr1 12 ; CHECK-LABEL: name: concat_vectors_v4s16_ss 13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1 15 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:sgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>) 16 %0:_(<2 x s16>) = COPY $sgpr0 17 %1:_(<2 x s16>) = COPY $sgpr1 18 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 19... 20 21--- 22name: concat_vectors_v4s16_sv 23legalized: true 24 25body: | 26 bb.0: 27 liveins: $sgpr0, $vgpr0 28 ; CHECK-LABEL: name: concat_vectors_v4s16_sv 29 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 30 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 31 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>) 32 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY1]](<2 x s16>) 33 %0:_(<2 x s16>) = COPY $sgpr0 34 %1:_(<2 x s16>) = COPY $vgpr0 35 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 36... 37 38--- 39name: concat_vectors_v4s16_vs 40legalized: true 41 42body: | 43 bb.0: 44 liveins: $vgpr0, $sgpr0 45 ; CHECK-LABEL: name: concat_vectors_v4s16_vs 46 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 47 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 48 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>) 49 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY2]](<2 x s16>) 50 %0:_(<2 x s16>) = COPY $vgpr0 51 %1:_(<2 x s16>) = COPY $sgpr0 52 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 53... 54 55--- 56name: concat_vectors_v4s16_vv 57legalized: true 58 59body: | 60 bb.0: 61 liveins: $vgpr0, $vgpr1 62 ; CHECK-LABEL: name: concat_vectors_v4s16_vv 63 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 64 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1 65 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>) 66 %0:_(<2 x s16>) = COPY $vgpr0 67 %1:_(<2 x s16>) = COPY $vgpr1 68 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 69... 70 71--- 72name: concat_vectors_v4s16_aa 73legalized: true 74 75body: | 76 bb.0: 77 liveins: $agpr0, $agpr1 78 ; CHECK-LABEL: name: concat_vectors_v4s16_aa 79 ; CHECK: [[COPY:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0 80 ; CHECK: [[COPY1:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr1 81 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:agpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>) 82 ; CHECK: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>) 83 %0:_(<2 x s16>) = COPY $agpr0 84 %1:_(<2 x s16>) = COPY $agpr1 85 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 86 S_ENDPGM 0, implicit %2 87... 88 89--- 90name: concat_vectors_v4s16_av 91legalized: true 92 93body: | 94 bb.0: 95 liveins: $agpr0, $vgpr0 96 ; CHECK-LABEL: name: concat_vectors_v4s16_av 97 ; CHECK: [[COPY:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0 98 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 99 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>) 100 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY1]](<2 x s16>) 101 ; CHECK: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>) 102 %0:_(<2 x s16>) = COPY $agpr0 103 %1:_(<2 x s16>) = COPY $vgpr0 104 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 105 S_ENDPGM 0, implicit %2 106... 107 108--- 109name: concat_vectors_v4s16_va 110legalized: true 111 112body: | 113 bb.0: 114 liveins: $agpr0, $vgpr0 115 ; CHECK-LABEL: name: concat_vectors_v4s16_va 116 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 117 ; CHECK: [[COPY1:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0 118 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>) 119 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY2]](<2 x s16>) 120 ; CHECK: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>) 121 %0:_(<2 x s16>) = COPY $vgpr0 122 %1:_(<2 x s16>) = COPY $agpr0 123 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 124 S_ENDPGM 0, implicit %2 125... 126 127--- 128name: concat_vectors_v4s16_as 129legalized: true 130 131body: | 132 bb.0: 133 liveins: $agpr0, $sgpr0 134 ; CHECK-LABEL: name: concat_vectors_v4s16_as 135 ; CHECK: [[COPY:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0 136 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 137 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>) 138 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>) 139 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY3]](<2 x s16>) 140 ; CHECK: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>) 141 %0:_(<2 x s16>) = COPY $agpr0 142 %1:_(<2 x s16>) = COPY $sgpr0 143 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 144 S_ENDPGM 0, implicit %2 145... 146 147--- 148name: concat_vectors_v4s16_sa 149legalized: true 150 151body: | 152 bb.0: 153 liveins: $agpr0, $sgpr0 154 ; CHECK-LABEL: name: concat_vectors_v4s16_sa 155 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 156 ; CHECK: [[COPY1:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0 157 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>) 158 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>) 159 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY3]](<2 x s16>) 160 ; CHECK: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>) 161 %0:_(<2 x s16>) = COPY $sgpr0 162 %1:_(<2 x s16>) = COPY $agpr0 163 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 164 S_ENDPGM 0, implicit %2 165... 166