1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s
5 name: concat_vectors_v2s32_v2s32
9 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
10 ; CHECK-LABEL: name: concat_vectors_v2s32_v2s32
11 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
14 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
15 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s32>) = G_CONCAT_VECTORS [[COPY]](<2 x s32>), [[COPY1]](<2 x s32>)
16 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x s32>)
17 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
18 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
19 %2:_(<4 x s32>) = G_CONCAT_VECTORS %0, %1
20 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
24 name: concat_vectors_v2s16_v2s16
28 liveins: $vgpr0, $vgpr1
29 ; CHECK-LABEL: name: concat_vectors_v2s16_v2s16
30 ; CHECK: liveins: $vgpr0, $vgpr1
32 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
33 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1
34 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>)
35 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
36 %0:_(<2 x s16>) = COPY $vgpr0
37 %1:_(<2 x s16>) = COPY $vgpr1
38 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1
39 $vgpr0_vgpr1 = COPY %2
43 name: concat_vectors_v2s16_v2s16_v2s16_v2s16
47 liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
48 ; CHECK-LABEL: name: concat_vectors_v2s16_v2s16_v2s16_v2s16
49 ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
51 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
52 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1
53 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
54 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr3
55 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s16>) = G_CONCAT_VECTORS [[COPY]](<2 x s16>), [[COPY1]](<2 x s16>), [[COPY2]](<2 x s16>), [[COPY3]](<2 x s16>)
56 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<8 x s16>)
57 %0:_(<2 x s16>) = COPY $vgpr0
58 %1:_(<2 x s16>) = COPY $vgpr1
59 %2:_(<2 x s16>) = COPY $vgpr2
60 %3:_(<2 x s16>) = COPY $vgpr3
61 %4:_(<8 x s16>) = G_CONCAT_VECTORS %0, %1, %2, %3
62 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
66 name: concat_vectors_v4s16_v4s16
70 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
71 ; CHECK-LABEL: name: concat_vectors_v4s16_v4s16
72 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
74 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
75 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
76 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s16>) = G_CONCAT_VECTORS [[COPY]](<4 x s16>), [[COPY1]](<4 x s16>)
77 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<8 x s16>)
78 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
79 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
80 %2:_(<8 x s16>) = G_CONCAT_VECTORS %0, %1
81 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
85 name: concat_vectors_v4s32_v4s32
89 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
90 ; CHECK-LABEL: name: concat_vectors_v4s32_v4s32
91 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
93 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
94 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
95 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s32>) = G_CONCAT_VECTORS [[COPY]](<4 x s32>), [[COPY1]](<4 x s32>)
96 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[CONCAT_VECTORS]](<8 x s32>)
97 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3,
98 %1:_(<4 x s32>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
99 %2:_(<8 x s32>) = G_CONCAT_VECTORS %0, %1
100 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
104 name: concat_vectors_v2s32_v2s32_v2s32_v2s32
108 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7
109 ; CHECK-LABEL: name: concat_vectors_v2s32_v2s32_v2s32_v2s32
110 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7
112 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
113 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
114 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
115 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr6_vgpr7
116 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s32>) = G_CONCAT_VECTORS [[COPY]](<2 x s32>), [[COPY1]](<2 x s32>), [[COPY2]](<2 x s32>), [[COPY3]](<2 x s32>)
117 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[CONCAT_VECTORS]](<8 x s32>)
118 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
119 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
120 %2:_(<2 x s32>) = COPY $vgpr4_vgpr5
121 %3:_(<2 x s32>) = COPY $vgpr6_vgpr7
123 %4:_(<8 x s32>) = G_CONCAT_VECTORS %0, %1, %2, %3
124 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %4
127 name: concat_vectors_v2s64_v2s64
131 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
132 ; CHECK-LABEL: name: concat_vectors_v2s64_v2s64
133 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
135 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
136 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
137 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s64>) = G_CONCAT_VECTORS [[COPY]](<2 x s64>), [[COPY1]](<2 x s64>)
138 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[CONCAT_VECTORS]](<4 x s64>)
139 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
140 %1:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
141 %2:_(<4 x s64>) = G_CONCAT_VECTORS %0, %1
142 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
146 name: concat_vectors_v2p1_v2p1
150 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
151 ; CHECK-LABEL: name: concat_vectors_v2p1_v2p1
152 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
154 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x p1>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
155 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x p1>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
156 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p1>) = G_CONCAT_VECTORS [[COPY]](<2 x p1>), [[COPY1]](<2 x p1>)
157 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[CONCAT_VECTORS]](<4 x p1>)
158 %0:_(<2 x p1>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
159 %1:_(<2 x p1>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
160 %2:_(<4 x p1>) = G_CONCAT_VECTORS %0, %1
161 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
165 name: concat_vectors_v2p0_v2p0
169 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
170 ; CHECK-LABEL: name: concat_vectors_v2p0_v2p0
171 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
173 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
174 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
175 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p0>) = G_CONCAT_VECTORS [[COPY]](<2 x p0>), [[COPY1]](<2 x p0>)
176 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[CONCAT_VECTORS]](<4 x p0>)
177 %0:_(<2 x p0>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
178 %1:_(<2 x p0>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
179 %2:_(<4 x p0>) = G_CONCAT_VECTORS %0, %1
180 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
184 name: concat_vectors_v2p3_v2p3
188 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
189 ; CHECK-LABEL: name: concat_vectors_v2p3_v2p3
190 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
192 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr0_vgpr1
193 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr2_vgpr3
194 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p3>) = G_CONCAT_VECTORS [[COPY]](<2 x p3>), [[COPY1]](<2 x p3>)
195 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x p3>)
196 %0:_(<2 x p3>) = COPY $vgpr0_vgpr1
197 %1:_(<2 x p3>) = COPY $vgpr2_vgpr3
198 %2:_(<4 x p3>) = G_CONCAT_VECTORS %0, %1
199 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
203 name: concat_vectors_v2p5_v2p5
207 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
208 ; CHECK-LABEL: name: concat_vectors_v2p5_v2p5
209 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
211 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x p5>) = COPY $vgpr0_vgpr1
212 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x p5>) = COPY $vgpr2_vgpr3
213 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p5>) = G_CONCAT_VECTORS [[COPY]](<2 x p5>), [[COPY1]](<2 x p5>)
214 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x p5>)
215 %0:_(<2 x p5>) = COPY $vgpr0_vgpr1
216 %1:_(<2 x p5>) = COPY $vgpr2_vgpr3
217 %2:_(<4 x p5>) = G_CONCAT_VECTORS %0, %1
218 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
222 name: concat_vectors_v2p999_v2p999
226 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
227 ; CHECK-LABEL: name: concat_vectors_v2p999_v2p999
228 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
230 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x p999>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
231 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x p999>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
232 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p999>) = G_CONCAT_VECTORS [[COPY]](<2 x p999>), [[COPY1]](<2 x p999>)
233 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[CONCAT_VECTORS]](<4 x p999>)
234 %0:_(<2 x p999>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
235 %1:_(<2 x p999>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
236 %2:_(<4 x p999>) = G_CONCAT_VECTORS %0, %1
237 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
241 name: concat_vectors_v6s16_v3s16
245 liveins: $vgpr0_vgpr1_vgpr2
246 ; CHECK-LABEL: name: concat_vectors_v6s16_v3s16
247 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
249 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
250 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[COPY]](<6 x s16>)
251 %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
252 %1:_(<3 x s16>), %2:_(<3 x s16>) = G_UNMERGE_VALUES %0
253 %3:_(<6 x s16>) = G_CONCAT_VECTORS %1, %2
254 $vgpr0_vgpr1_vgpr2 = COPY %3