1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx908 -run-pass=amdgpu-regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx908 -run-pass=amdgpu-regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck %s
6 name: concat_vectors_v4s16_ss
11 liveins: $sgpr0, $sgpr1
12 ; CHECK-LABEL: name: concat_vectors_v4s16_ss
13 ; CHECK: liveins: $sgpr0, $sgpr1
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
16 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
17 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:sgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>)
18 %0:_(<2 x s16>) = COPY $sgpr0
19 %1:_(<2 x s16>) = COPY $sgpr1
20 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
24 name: concat_vectors_v4s16_sv
29 liveins: $sgpr0, $vgpr0
30 ; CHECK-LABEL: name: concat_vectors_v4s16_sv
31 ; CHECK: liveins: $sgpr0, $vgpr0
33 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
34 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
35 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>)
36 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY1]](<2 x s16>)
37 %0:_(<2 x s16>) = COPY $sgpr0
38 %1:_(<2 x s16>) = COPY $vgpr0
39 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
43 name: concat_vectors_v4s16_vs
48 liveins: $vgpr0, $sgpr0
49 ; CHECK-LABEL: name: concat_vectors_v4s16_vs
50 ; CHECK: liveins: $vgpr0, $sgpr0
52 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
53 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
54 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
55 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY2]](<2 x s16>)
56 %0:_(<2 x s16>) = COPY $vgpr0
57 %1:_(<2 x s16>) = COPY $sgpr0
58 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
62 name: concat_vectors_v4s16_vv
67 liveins: $vgpr0, $vgpr1
68 ; CHECK-LABEL: name: concat_vectors_v4s16_vv
69 ; CHECK: liveins: $vgpr0, $vgpr1
71 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
72 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
73 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>)
74 %0:_(<2 x s16>) = COPY $vgpr0
75 %1:_(<2 x s16>) = COPY $vgpr1
76 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
80 name: concat_vectors_v4s16_aa
85 liveins: $agpr0, $agpr1
86 ; CHECK-LABEL: name: concat_vectors_v4s16_aa
87 ; CHECK: liveins: $agpr0, $agpr1
89 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0
90 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr1
91 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:agpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>)
92 ; CHECK-NEXT: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>)
93 %0:_(<2 x s16>) = COPY $agpr0
94 %1:_(<2 x s16>) = COPY $agpr1
95 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
96 S_ENDPGM 0, implicit %2
100 name: concat_vectors_v4s16_av
105 liveins: $agpr0, $vgpr0
106 ; CHECK-LABEL: name: concat_vectors_v4s16_av
107 ; CHECK: liveins: $agpr0, $vgpr0
109 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0
110 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
111 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>)
112 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY1]](<2 x s16>)
113 ; CHECK-NEXT: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>)
114 %0:_(<2 x s16>) = COPY $agpr0
115 %1:_(<2 x s16>) = COPY $vgpr0
116 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
117 S_ENDPGM 0, implicit %2
121 name: concat_vectors_v4s16_va
126 liveins: $agpr0, $vgpr0
127 ; CHECK-LABEL: name: concat_vectors_v4s16_va
128 ; CHECK: liveins: $agpr0, $vgpr0
130 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
131 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0
132 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
133 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY2]](<2 x s16>)
134 ; CHECK-NEXT: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>)
135 %0:_(<2 x s16>) = COPY $vgpr0
136 %1:_(<2 x s16>) = COPY $agpr0
137 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
138 S_ENDPGM 0, implicit %2
142 name: concat_vectors_v4s16_as
147 liveins: $agpr0, $sgpr0
148 ; CHECK-LABEL: name: concat_vectors_v4s16_as
149 ; CHECK: liveins: $agpr0, $sgpr0
151 ; CHECK-NEXT: [[COPY:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0
152 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
153 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>)
154 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
155 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY3]](<2 x s16>)
156 ; CHECK-NEXT: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>)
157 %0:_(<2 x s16>) = COPY $agpr0
158 %1:_(<2 x s16>) = COPY $sgpr0
159 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
160 S_ENDPGM 0, implicit %2
164 name: concat_vectors_v4s16_sa
169 liveins: $agpr0, $sgpr0
170 ; CHECK-LABEL: name: concat_vectors_v4s16_sa
171 ; CHECK: liveins: $agpr0, $sgpr0
173 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
174 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:agpr(<2 x s16>) = COPY $agpr0
175 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>)
176 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
177 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[COPY2]](<2 x s16>), [[COPY3]](<2 x s16>)
178 ; CHECK-NEXT: S_ENDPGM 0, implicit [[CONCAT_VECTORS]](<4 x s16>)
179 %0:_(<2 x s16>) = COPY $sgpr0
180 %1:_(<2 x s16>) = COPY $agpr0
181 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
182 S_ENDPGM 0, implicit %2