1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -march=amdgcn -mcpu=tahiti -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
9 ; CHECK-LABEL: name: test_select_s32
10 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
11 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
12 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
13 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
14 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
15 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
16 ; CHECK: $vgpr0 = COPY [[SELECT]](s32)
17 %0:_(s32) = G_CONSTANT i32 0
18 %1:_(s32) = COPY $vgpr0
20 %2:_(s1) = G_ICMP intpred(ne), %0, %1
21 %3:_(s32) = G_CONSTANT i32 1
22 %4:_(s32) = G_CONSTANT i32 2
23 %5:_(s32) = G_SELECT %2, %3, %4
33 ; CHECK-LABEL: name: test_select_s64
34 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
35 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
36 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
37 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
38 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
39 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
40 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](s64)
41 %0:_(s32) = G_CONSTANT i32 0
42 %1:_(s32) = COPY $vgpr0
44 %2:_(s1) = G_ICMP intpred(ne), %0, %1
45 %3:_(s64) = G_CONSTANT i64 1
46 %4:_(s64) = G_CONSTANT i64 2
47 %5:_(s64) = G_SELECT %2, %3, %4
48 $vgpr0_vgpr1 = COPY %5
57 ; CHECK-LABEL: name: test_select_s48
58 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
59 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
60 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
61 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
62 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
63 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[C1]](s64)
64 ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY [[C2]](s64)
65 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
66 ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY [[SELECT]](s64)
67 ; CHECK: $vgpr0_vgpr1 = COPY [[COPY3]](s64)
68 %0:_(s32) = G_CONSTANT i32 0
69 %1:_(s32) = COPY $vgpr0
71 %2:_(s1) = G_ICMP intpred(ne), %0, %1
72 %3:_(s48) = G_CONSTANT i48 1
73 %4:_(s48) = G_CONSTANT i48 2
74 %5:_(s48) = G_SELECT %2, %3, %4
75 %6:_(s64) = G_ANYEXT %5
76 $vgpr0_vgpr1 = COPY %6
85 ; CHECK-LABEL: name: test_select_s16
86 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
87 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
88 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
89 ; CHECK: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 1
90 ; CHECK: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
91 ; CHECK: [[SELECT:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
92 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT]](s16)
93 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
94 %0:_(s32) = G_CONSTANT i32 0
95 %1:_(s32) = COPY $vgpr0
97 %2:_(s1) = G_ICMP intpred(ne), %0, %1
98 %3:_(s16) = G_CONSTANT i16 1
99 %4:_(s16) = G_CONSTANT i16 2
100 %5:_(s16) = G_SELECT %2, %3, %4
101 %6:_(s32) = G_ANYEXT %5
111 ; CHECK-LABEL: name: test_select_s8
112 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
113 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
114 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
115 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
116 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
117 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[C1]](s32)
118 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[C2]](s32)
119 ; CHECK: [[SELECT:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[TRUNC]], [[TRUNC1]]
120 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT]](s16)
121 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
122 %0:_(s32) = G_CONSTANT i32 0
123 %1:_(s32) = COPY $vgpr0
125 %2:_(s1) = G_ICMP intpred(ne), %0, %1
126 %3:_(s8) = G_CONSTANT i8 1
127 %4:_(s8) = G_CONSTANT i8 2
128 %5:_(s8) = G_SELECT %2, %3, %4
129 %6:_(s32) = G_ANYEXT %5
139 ; CHECK-LABEL: name: test_select_s7
140 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
141 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
142 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
143 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
144 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
145 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[C1]](s32)
146 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[C2]](s32)
147 ; CHECK: [[SELECT:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[TRUNC]], [[TRUNC1]]
148 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT]](s16)
149 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
150 %0:_(s32) = G_CONSTANT i32 0
151 %1:_(s32) = COPY $vgpr0
153 %2:_(s1) = G_ICMP intpred(ne), %0, %1
154 %3:_(s7) = G_CONSTANT i7 1
155 %4:_(s7) = G_CONSTANT i7 2
156 %5:_(s7) = G_SELECT %2, %3, %4
157 %6:_(s32) = G_ANYEXT %5
163 name: test_select_s96
166 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4_vgpr5 , $vgpr6
167 ; CHECK-LABEL: name: test_select_s96
168 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
169 ; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr3_vgpr4_vgpr5
170 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr6
171 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
172 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY2]](s32), [[C]]
173 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](s96), 0
174 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 64
175 ; CHECK: [[EXTRACT2:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY1]](s96), 0
176 ; CHECK: [[EXTRACT3:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](s96), 64
177 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[EXTRACT]], [[EXTRACT2]]
178 ; CHECK: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[EXTRACT1]], [[EXTRACT3]]
179 ; CHECK: [[DEF:%[0-9]+]]:_(s96) = G_IMPLICIT_DEF
180 ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[DEF]], [[SELECT]](s64), 0
181 ; CHECK: [[INSERT1:%[0-9]+]]:_(s96) = G_INSERT [[INSERT]], [[SELECT1]](s32), 64
182 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT1]](s96)
183 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
184 %1:_(s96) = COPY $vgpr3_vgpr4_vgpr5
185 %2:_(s32) = COPY $vgpr6
186 %3:_(s32) = G_CONSTANT i32 0
188 %4:_(s1) = G_ICMP intpred(ne), %2, %3
189 %5:_(s96) = G_SELECT %4, %0, %1
190 $vgpr0_vgpr1_vgpr2 = COPY %5
195 name: test_select_s128
198 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7 , $vgpr8
200 ; CHECK-LABEL: name: test_select_s128
201 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
202 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
203 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr8
204 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
205 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY2]](s32), [[C]]
206 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](s128)
207 ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](s128)
208 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV]], [[UV2]]
209 ; CHECK: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV3]]
210 ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[SELECT]](s64), [[SELECT1]](s64)
211 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[MV]](s128)
212 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
213 %1:_(s128) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
214 %2:_(s32) = COPY $vgpr8
215 %3:_(s32) = G_CONSTANT i32 0
216 %4:_(s1) = G_ICMP intpred(ne), %2, %3
217 %5:_(s128) = G_SELECT %4, %0, %1
218 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
223 name: test_select_v2s8
226 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
228 ; CHECK-LABEL: name: test_select_v2s8
229 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
230 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
231 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr1_vgpr2
232 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr3_vgpr4
233 ; CHECK: [[TRUNC:%[0-9]+]]:_(<2 x s8>) = G_TRUNC [[COPY1]](<2 x s32>)
234 ; CHECK: [[TRUNC1:%[0-9]+]]:_(<2 x s8>) = G_TRUNC [[COPY2]](<2 x s32>)
235 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
236 ; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[TRUNC]](<2 x s8>)
237 ; CHECK: [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[TRUNC1]](<2 x s8>)
238 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s16) = G_ANYEXT [[UV]](s8)
239 ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s16) = G_ANYEXT [[UV2]](s8)
240 ; CHECK: [[SELECT:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT]], [[ANYEXT1]]
241 ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s16) = G_ANYEXT [[UV1]](s8)
242 ; CHECK: [[ANYEXT3:%[0-9]+]]:_(s16) = G_ANYEXT [[UV3]](s8)
243 ; CHECK: [[SELECT1:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT2]], [[ANYEXT3]]
244 ; CHECK: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT]](s16)
245 ; CHECK: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT1]](s16)
246 ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ANYEXT4]](s32)
247 ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ANYEXT5]](s32)
248 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY3]](s32), [[COPY4]](s32)
249 ; CHECK: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
250 %0:_(s32) = COPY $vgpr0
251 %1:_(s32) = G_CONSTANT i32 0
252 %2:_(<2 x s32>) = COPY $vgpr1_vgpr2
253 %3:_(<2 x s32>) = COPY $vgpr3_vgpr4
254 %4:_(<2 x s8>) = G_TRUNC %2
255 %5:_(<2 x s8>) = G_TRUNC %3
257 %6:_(s1) = G_ICMP intpred(ne), %0, %1
258 %7:_(<2 x s8>) = G_SELECT %6, %4, %5
259 %8:_(<2 x s32>) = G_ANYEXT %7
260 $vgpr0_vgpr1 = COPY %8
265 name: test_select_v3s8
268 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
270 ; CHECK-LABEL: name: test_select_v3s8
271 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
272 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
273 ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr1_vgpr2_vgpr3
274 ; CHECK: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
275 ; CHECK: [[TRUNC:%[0-9]+]]:_(<3 x s8>) = G_TRUNC [[COPY1]](<3 x s32>)
276 ; CHECK: [[TRUNC1:%[0-9]+]]:_(<3 x s8>) = G_TRUNC [[COPY2]](<3 x s32>)
277 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
278 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s8>) = G_IMPLICIT_DEF
279 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s8>) = G_INSERT [[DEF]], [[TRUNC]](<3 x s8>), 0
280 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s8>) = G_IMPLICIT_DEF
281 ; CHECK: [[ANYEXT:%[0-9]+]]:_(<4 x s16>) = G_ANYEXT [[DEF1]](<4 x s8>)
282 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[ANYEXT]], [[TRUNC1]](<3 x s8>), 0
283 ; CHECK: [[TRUNC2:%[0-9]+]]:_(<4 x s8>) = G_TRUNC [[INSERT1]](<4 x s16>)
284 ; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[INSERT]](<4 x s8>)
285 ; CHECK: [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[TRUNC2]](<4 x s8>)
286 ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s16) = G_ANYEXT [[UV]](s8)
287 ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s16) = G_ANYEXT [[UV4]](s8)
288 ; CHECK: [[SELECT:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT1]], [[ANYEXT2]]
289 ; CHECK: [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[SELECT]](s16)
290 ; CHECK: [[ANYEXT3:%[0-9]+]]:_(s16) = G_ANYEXT [[UV1]](s8)
291 ; CHECK: [[ANYEXT4:%[0-9]+]]:_(s16) = G_ANYEXT [[UV5]](s8)
292 ; CHECK: [[SELECT1:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT3]], [[ANYEXT4]]
293 ; CHECK: [[TRUNC4:%[0-9]+]]:_(s8) = G_TRUNC [[SELECT1]](s16)
294 ; CHECK: [[ANYEXT5:%[0-9]+]]:_(s16) = G_ANYEXT [[UV2]](s8)
295 ; CHECK: [[ANYEXT6:%[0-9]+]]:_(s16) = G_ANYEXT [[UV6]](s8)
296 ; CHECK: [[SELECT2:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT5]], [[ANYEXT6]]
297 ; CHECK: [[TRUNC5:%[0-9]+]]:_(s8) = G_TRUNC [[SELECT2]](s16)
298 ; CHECK: [[ANYEXT7:%[0-9]+]]:_(s16) = G_ANYEXT [[UV3]](s8)
299 ; CHECK: [[ANYEXT8:%[0-9]+]]:_(s16) = G_ANYEXT [[UV7]](s8)
300 ; CHECK: [[SELECT3:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT7]], [[ANYEXT8]]
301 ; CHECK: [[TRUNC6:%[0-9]+]]:_(s8) = G_TRUNC [[SELECT3]](s16)
302 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s8>) = G_BUILD_VECTOR [[TRUNC3]](s8), [[TRUNC4]](s8), [[TRUNC5]](s8), [[TRUNC6]](s8)
303 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s8>) = G_EXTRACT [[BUILD_VECTOR]](<4 x s8>), 0
304 ; CHECK: [[ANYEXT9:%[0-9]+]]:_(<3 x s32>) = G_ANYEXT [[EXTRACT]](<3 x s8>)
305 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[ANYEXT9]](<3 x s32>)
306 %0:_(s32) = COPY $vgpr0
307 %1:_(s32) = G_CONSTANT i32 0
308 %2:_(<3 x s32>) = COPY $vgpr1_vgpr2_vgpr3
309 %3:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
310 %4:_(<3 x s8>) = G_TRUNC %2
311 %5:_(<3 x s8>) = G_TRUNC %3
313 %6:_(s1) = G_ICMP intpred(ne), %0, %1
314 %7:_(<3 x s8>) = G_SELECT %6, %4, %5
315 %8:_(<3 x s32>) = G_ANYEXT %7
316 $vgpr0_vgpr1_vgpr2 = COPY %8
321 name: test_select_v4s8
324 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7_vgpr8
326 ; CHECK-LABEL: name: test_select_v4s8
327 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
328 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
329 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
330 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
331 ; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s8>) = G_TRUNC [[COPY1]](<4 x s32>)
332 ; CHECK: [[TRUNC1:%[0-9]+]]:_(<4 x s8>) = G_TRUNC [[COPY2]](<4 x s32>)
333 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
334 ; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[TRUNC]](<4 x s8>)
335 ; CHECK: [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[TRUNC1]](<4 x s8>)
336 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s16) = G_ANYEXT [[UV]](s8)
337 ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s16) = G_ANYEXT [[UV4]](s8)
338 ; CHECK: [[SELECT:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT]], [[ANYEXT1]]
339 ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s16) = G_ANYEXT [[UV1]](s8)
340 ; CHECK: [[ANYEXT3:%[0-9]+]]:_(s16) = G_ANYEXT [[UV5]](s8)
341 ; CHECK: [[SELECT1:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT2]], [[ANYEXT3]]
342 ; CHECK: [[ANYEXT4:%[0-9]+]]:_(s16) = G_ANYEXT [[UV2]](s8)
343 ; CHECK: [[ANYEXT5:%[0-9]+]]:_(s16) = G_ANYEXT [[UV6]](s8)
344 ; CHECK: [[SELECT2:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT4]], [[ANYEXT5]]
345 ; CHECK: [[ANYEXT6:%[0-9]+]]:_(s16) = G_ANYEXT [[UV3]](s8)
346 ; CHECK: [[ANYEXT7:%[0-9]+]]:_(s16) = G_ANYEXT [[UV7]](s8)
347 ; CHECK: [[SELECT3:%[0-9]+]]:_(s16) = G_SELECT [[ICMP]](s1), [[ANYEXT6]], [[ANYEXT7]]
348 ; CHECK: [[ANYEXT8:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT]](s16)
349 ; CHECK: [[ANYEXT9:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT1]](s16)
350 ; CHECK: [[ANYEXT10:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT2]](s16)
351 ; CHECK: [[ANYEXT11:%[0-9]+]]:_(s32) = G_ANYEXT [[SELECT3]](s16)
352 ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ANYEXT8]](s32)
353 ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ANYEXT9]](s32)
354 ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ANYEXT10]](s32)
355 ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[ANYEXT11]](s32)
356 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[COPY3]](s32), [[COPY4]](s32), [[COPY5]](s32), [[COPY6]](s32)
357 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
358 %0:_(s32) = COPY $vgpr0
359 %1:_(s32) = G_CONSTANT i32 0
360 %2:_(<4 x s32>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
361 %3:_(<4 x s32>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
362 %4:_(<4 x s8>) = G_TRUNC %2
363 %5:_(<4 x s8>) = G_TRUNC %3
365 %6:_(s1) = G_ICMP intpred(ne), %0, %1
366 %7:_(<4 x s8>) = G_SELECT %6, %4, %5
367 %8:_(<4 x s32>) = G_ANYEXT %7
368 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %8
373 name: test_select_v2s16
376 liveins: $vgpr0, $vgpr1, $vgpr2
377 ; CHECK-LABEL: name: test_select_v2s16
378 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
379 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1
380 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2
381 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
382 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY2]](s32), [[C]]
383 ; CHECK: [[SELECT:%[0-9]+]]:_(<2 x s16>) = G_SELECT [[ICMP]](s1), [[COPY]], [[COPY1]]
384 ; CHECK: $vgpr0 = COPY [[SELECT]](<2 x s16>)
385 %0:_(<2 x s16>) = COPY $vgpr0
386 %1:_(<2 x s16>) = COPY $vgpr1
387 %2:_(s32) = COPY $vgpr2
388 %3:_(s32) = G_CONSTANT i32 0
390 %4:_(s1) = G_ICMP intpred(ne), %2, %3
391 %5:_(<2 x s16>) = G_SELECT %4, %0, %1
397 name: test_select_v3s16
400 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
401 ; CHECK-LABEL: name: test_select_v3s16
402 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
403 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr1_vgpr2
404 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr3_vgpr4
405 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
406 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
407 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY1]](<4 x s16>), 0
408 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY2]](<4 x s16>), 0
409 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
410 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
411 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
412 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
413 ; CHECK: [[SELECT:%[0-9]+]]:_(<4 x s16>) = G_SELECT [[ICMP]](s1), [[INSERT]], [[INSERT1]]
414 ; CHECK: [[EXTRACT2:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[SELECT]](<4 x s16>), 0
415 ; CHECK: [[DEF2:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
416 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF2]], [[EXTRACT2]](<3 x s16>), 0
417 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
418 %0:_(s32) = COPY $vgpr0
419 %1:_(<4 x s16>) = COPY $vgpr1_vgpr2
420 %2:_(<4 x s16>) = COPY $vgpr3_vgpr4
421 %4:_(s32) = G_CONSTANT i32 0
422 %5:_(s1) = G_ICMP intpred(ne), %0, %4
424 %6:_(<3 x s16>) = G_EXTRACT %1, 0
425 %7:_(<3 x s16>) = G_EXTRACT %2, 0
426 %8:_(<3 x s16>) = G_SELECT %5, %6, %7
427 %9:_(<4 x s16>) = G_IMPLICIT_DEF
428 %10:_(<4 x s16>) = G_INSERT %9, %8, 0
429 $vgpr0_vgpr1 = COPY %10
434 name: test_select_v4s16
437 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
438 ; CHECK-LABEL: name: test_select_v4s16
439 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
440 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr1_vgpr2
441 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr3_vgpr4
442 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
443 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
444 ; CHECK: [[SELECT:%[0-9]+]]:_(<4 x s16>) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
445 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](<4 x s16>)
446 %0:_(s32) = COPY $vgpr0
447 %1:_(<4 x s16>) = COPY $vgpr1_vgpr2
448 %2:_(<4 x s16>) = COPY $vgpr3_vgpr4
449 %4:_(s32) = G_CONSTANT i32 0
451 %5:_(s1) = G_ICMP intpred(ne), %0, %4
452 %6:_(<4 x s16>) = G_SELECT %5, %1, %2
453 $vgpr0_vgpr1 = COPY %6
458 name: test_select_v2s32
461 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
462 ; CHECK-LABEL: name: test_select_v2s32
463 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
464 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr1_vgpr2
465 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr3_vgpr4
466 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
467 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
468 ; CHECK: [[SELECT:%[0-9]+]]:_(<2 x s32>) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
469 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](<2 x s32>)
470 %0:_(s32) = COPY $vgpr0
471 %1:_(<2 x s32>) = COPY $vgpr1_vgpr2
472 %2:_(<2 x s32>) = COPY $vgpr3_vgpr4
473 %4:_(s32) = G_CONSTANT i32 0
475 %5:_(s1) = G_ICMP intpred(ne), %0, %4
476 %6:_(<2 x s32>) = G_SELECT %5, %1, %2
477 $vgpr0_vgpr1 = COPY %6
482 name: test_select_v3s32
485 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
486 ; CHECK-LABEL: name: test_select_v3s32
487 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
488 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
489 ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr1_vgpr2_vgpr3
490 ; CHECK: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
491 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
492 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
493 ; CHECK: [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY2]](<3 x s32>)
494 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[UV]], [[UV3]]
495 ; CHECK: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV4]]
496 ; CHECK: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[UV2]], [[UV5]]
497 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[SELECT]](s32), [[SELECT1]](s32), [[SELECT2]](s32)
498 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
499 %0:_(s32) = G_CONSTANT i32 0
500 %1:_(s32) = COPY $vgpr0
501 %2:_(<3 x s32>) = COPY $vgpr1_vgpr2_vgpr3
502 %3:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
504 %4:_(s1) = G_ICMP intpred(ne), %0, %1
505 %5:_(<3 x s32>) = G_SELECT %4, %2, %3
506 $vgpr0_vgpr1_vgpr2 = COPY %5
511 name: test_select_v4s32
514 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7_vgpr8
515 ; CHECK-LABEL: name: test_select_v4s32
516 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
517 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
518 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
519 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
520 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
521 ; CHECK: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
522 ; CHECK: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[COPY2]](<4 x s32>)
523 ; CHECK: [[SELECT:%[0-9]+]]:_(<2 x s32>) = G_SELECT [[ICMP]](s1), [[UV]], [[UV2]]
524 ; CHECK: [[SELECT1:%[0-9]+]]:_(<2 x s32>) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV3]]
525 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s32>) = G_CONCAT_VECTORS [[SELECT]](<2 x s32>), [[SELECT1]](<2 x s32>)
526 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x s32>)
527 %0:_(s32) = G_CONSTANT i32 0
528 %1:_(s32) = COPY $vgpr0
529 %2:_(<4 x s32>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
530 %3:_(<4 x s32>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
532 %4:_(s1) = G_ICMP intpred(ne), %0, %1
533 %5:_(<4 x s32>) = G_SELECT %4, %2, %3
534 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
539 name: test_select_v2s64
542 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7_vgpr8
543 ; CHECK-LABEL: name: test_select_v2s64
544 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
545 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
546 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
547 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
548 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
549 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
550 ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY2]](<2 x s64>)
551 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV]], [[UV2]]
552 ; CHECK: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV3]]
553 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[SELECT]](s64), [[SELECT1]](s64)
554 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
555 %0:_(s32) = G_CONSTANT i32 0
556 %1:_(s32) = COPY $vgpr0
557 %2:_(<2 x s64>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
558 %3:_(<2 x s64>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
560 %4:_(s1) = G_ICMP intpred(ne), %0, %1
561 %5:_(<2 x s64>) = G_SELECT %4, %2, %3
562 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
570 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
571 ; CHECK-LABEL: name: test_select_p0
572 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
573 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
574 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr1_vgpr2
575 ; CHECK: [[COPY2:%[0-9]+]]:_(p0) = COPY $vgpr3_vgpr4
576 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
577 ; CHECK: [[SELECT:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
578 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](p0)
579 %0:_(s32) = G_CONSTANT i32 0
580 %1:_(s32) = COPY $vgpr0
581 %2:_(p0) = COPY $vgpr1_vgpr2
582 %3:_(p0) = COPY $vgpr3_vgpr4
584 %4:_(s1) = G_ICMP intpred(ne), %0, %1
585 %5:_(p0) = G_SELECT %4, %2, %3
586 $vgpr0_vgpr1 = COPY %5
594 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
595 ; CHECK-LABEL: name: test_select_p1
596 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
597 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
598 ; CHECK: [[COPY1:%[0-9]+]]:_(p1) = COPY $vgpr1_vgpr2
599 ; CHECK: [[COPY2:%[0-9]+]]:_(p1) = COPY $vgpr3_vgpr4
600 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
601 ; CHECK: [[SELECT:%[0-9]+]]:_(p1) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
602 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](p1)
603 %0:_(s32) = G_CONSTANT i32 0
604 %1:_(s32) = COPY $vgpr0
605 %2:_(p1) = COPY $vgpr1_vgpr2
606 %3:_(p1) = COPY $vgpr3_vgpr4
608 %4:_(s1) = G_ICMP intpred(ne), %0, %1
609 %5:_(p1) = G_SELECT %4, %2, %3
610 $vgpr0_vgpr1 = COPY %5
618 liveins: $vgpr0, $vgpr1, $vgpr2
619 ; CHECK-LABEL: name: test_select_p2
620 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
621 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
622 ; CHECK: [[COPY1:%[0-9]+]]:_(p2) = COPY $vgpr1
623 ; CHECK: [[COPY2:%[0-9]+]]:_(p2) = COPY $vgpr2
624 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
625 ; CHECK: [[SELECT:%[0-9]+]]:_(p2) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
626 ; CHECK: $vgpr0 = COPY [[SELECT]](p2)
627 %0:_(s32) = G_CONSTANT i32 0
628 %1:_(s32) = COPY $vgpr0
629 %2:_(p2) = COPY $vgpr1
630 %3:_(p2) = COPY $vgpr2
632 %4:_(s1) = G_ICMP intpred(ne), %0, %1
633 %5:_(p2) = G_SELECT %4, %2, %3
642 liveins: $vgpr0, $vgpr1, $vgpr2
643 ; CHECK-LABEL: name: test_select_p3
644 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
645 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
646 ; CHECK: [[COPY1:%[0-9]+]]:_(p3) = COPY $vgpr1
647 ; CHECK: [[COPY2:%[0-9]+]]:_(p3) = COPY $vgpr2
648 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
649 ; CHECK: [[SELECT:%[0-9]+]]:_(p3) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
650 ; CHECK: $vgpr0 = COPY [[SELECT]](p3)
651 %0:_(s32) = G_CONSTANT i32 0
652 %1:_(s32) = COPY $vgpr0
653 %2:_(p3) = COPY $vgpr1
654 %3:_(p3) = COPY $vgpr2
656 %4:_(s1) = G_ICMP intpred(ne), %0, %1
657 %5:_(p3) = G_SELECT %4, %2, %3
666 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
667 ; CHECK-LABEL: name: test_select_p4
668 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
669 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
670 ; CHECK: [[COPY1:%[0-9]+]]:_(p4) = COPY $vgpr1_vgpr2
671 ; CHECK: [[COPY2:%[0-9]+]]:_(p4) = COPY $vgpr3_vgpr4
672 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
673 ; CHECK: [[SELECT:%[0-9]+]]:_(p4) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
674 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](p4)
675 %0:_(s32) = G_CONSTANT i32 0
676 %1:_(s32) = COPY $vgpr0
677 %2:_(p4) = COPY $vgpr1_vgpr2
678 %3:_(p4) = COPY $vgpr3_vgpr4
680 %4:_(s1) = G_ICMP intpred(ne), %0, %1
681 %5:_(p4) = G_SELECT %4, %2, %3
682 $vgpr0_vgpr1 = COPY %5
690 liveins: $vgpr0, $vgpr1, $vgpr2
692 ; CHECK-LABEL: name: test_select_p5
693 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
694 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
695 ; CHECK: [[COPY1:%[0-9]+]]:_(p5) = COPY $vgpr1
696 ; CHECK: [[COPY2:%[0-9]+]]:_(p5) = COPY $vgpr2
697 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
698 ; CHECK: [[SELECT:%[0-9]+]]:_(p5) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
699 ; CHECK: $vgpr0 = COPY [[SELECT]](p5)
700 %0:_(s32) = G_CONSTANT i32 0
701 %1:_(s32) = COPY $vgpr0
702 %2:_(p5) = COPY $vgpr1
703 %3:_(p5) = COPY $vgpr2
704 %4:_(s1) = G_ICMP intpred(ne), %0, %1
705 %5:_(p5) = G_SELECT %4, %2, %3
711 name: test_select_p999
714 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
716 ; CHECK-LABEL: name: test_select_p999
717 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
718 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
719 ; CHECK: [[COPY1:%[0-9]+]]:_(p999) = COPY $vgpr1_vgpr2
720 ; CHECK: [[COPY2:%[0-9]+]]:_(p999) = COPY $vgpr3_vgpr4
721 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
722 ; CHECK: [[SELECT:%[0-9]+]]:_(p999) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
723 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](p999)
724 %0:_(s32) = G_CONSTANT i32 0
725 %1:_(s32) = COPY $vgpr0
726 %2:_(p999) = COPY $vgpr1_vgpr2
727 %3:_(p999) = COPY $vgpr3_vgpr4
728 %4:_(s1) = G_ICMP intpred(ne), %0, %1
729 %5:_(p999) = G_SELECT %4, %2, %3
730 $vgpr0_vgpr1 = COPY %5
736 name: test_select_v2p3
739 liveins: $vgpr0, $vgpr1_vgpr2, $vgpr3_vgpr4
741 ; CHECK-LABEL: name: test_select_v2p3
742 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
743 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr1_vgpr2
744 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr3_vgpr4
745 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
746 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
747 ; CHECK: [[SELECT:%[0-9]+]]:_(<2 x p3>) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
748 ; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](<2 x p3>)
749 %0:_(s32) = COPY $vgpr0
750 %1:_(<2 x p3>) = COPY $vgpr1_vgpr2
751 %2:_(<2 x p3>) = COPY $vgpr3_vgpr4
752 %4:_(s32) = G_CONSTANT i32 0
753 %5:_(s1) = G_ICMP intpred(ne), %0, %4
754 %6:_(<2 x p3>) = G_SELECT %5, %1, %2
755 $vgpr0_vgpr1 = COPY %6
760 name: test_select_v3p3
763 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
765 ; CHECK-LABEL: name: test_select_v3p3
766 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
767 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
768 ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x p3>) = COPY $vgpr1_vgpr2_vgpr3
769 ; CHECK: [[COPY2:%[0-9]+]]:_(<3 x p3>) = COPY $vgpr4_vgpr5_vgpr6
770 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
771 ; CHECK: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3), [[UV2:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY1]](<3 x p3>)
772 ; CHECK: [[UV3:%[0-9]+]]:_(p3), [[UV4:%[0-9]+]]:_(p3), [[UV5:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY2]](<3 x p3>)
773 ; CHECK: [[SELECT:%[0-9]+]]:_(p3) = G_SELECT [[ICMP]](s1), [[UV]], [[UV3]]
774 ; CHECK: [[SELECT1:%[0-9]+]]:_(p3) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV4]]
775 ; CHECK: [[SELECT2:%[0-9]+]]:_(p3) = G_SELECT [[ICMP]](s1), [[UV2]], [[UV5]]
776 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x p3>) = G_BUILD_VECTOR [[SELECT]](p3), [[SELECT1]](p3), [[SELECT2]](p3)
777 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x p3>)
778 %0:_(s32) = G_CONSTANT i32 0
779 %1:_(s32) = COPY $vgpr0
780 %2:_(<3 x p3>) = COPY $vgpr1_vgpr2_vgpr3
781 %3:_(<3 x p3>) = COPY $vgpr4_vgpr5_vgpr6
783 %4:_(s1) = G_ICMP intpred(ne), %0, %1
784 %5:_(<3 x p3>) = G_SELECT %4, %2, %3
785 $vgpr0_vgpr1_vgpr2 = COPY %5
790 name: test_select_v4p3
793 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7_vgpr8
795 ; CHECK-LABEL: name: test_select_v4p3
796 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
797 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
798 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x p3>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
799 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x p3>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
800 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
801 ; CHECK: [[UV:%[0-9]+]]:_(<2 x p3>), [[UV1:%[0-9]+]]:_(<2 x p3>) = G_UNMERGE_VALUES [[COPY1]](<4 x p3>)
802 ; CHECK: [[UV2:%[0-9]+]]:_(<2 x p3>), [[UV3:%[0-9]+]]:_(<2 x p3>) = G_UNMERGE_VALUES [[COPY2]](<4 x p3>)
803 ; CHECK: [[SELECT:%[0-9]+]]:_(<2 x p3>) = G_SELECT [[ICMP]](s1), [[UV]], [[UV2]]
804 ; CHECK: [[SELECT1:%[0-9]+]]:_(<2 x p3>) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV3]]
805 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p3>) = G_CONCAT_VECTORS [[SELECT]](<2 x p3>), [[SELECT1]](<2 x p3>)
806 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x p3>)
807 %0:_(s32) = G_CONSTANT i32 0
808 %1:_(s32) = COPY $vgpr0
809 %2:_(<4 x p3>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
810 %3:_(<4 x p3>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
812 %4:_(s1) = G_ICMP intpred(ne), %0, %1
813 %5:_(<4 x p3>) = G_SELECT %4, %2, %3
814 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
819 name: test_select_v4p5
822 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7_vgpr8
824 ; CHECK-LABEL: name: test_select_v4p5
825 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
826 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
827 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x p5>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
828 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x p5>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
829 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
830 ; CHECK: [[UV:%[0-9]+]]:_(<2 x p5>), [[UV1:%[0-9]+]]:_(<2 x p5>) = G_UNMERGE_VALUES [[COPY1]](<4 x p5>)
831 ; CHECK: [[UV2:%[0-9]+]]:_(<2 x p5>), [[UV3:%[0-9]+]]:_(<2 x p5>) = G_UNMERGE_VALUES [[COPY2]](<4 x p5>)
832 ; CHECK: [[SELECT:%[0-9]+]]:_(<2 x p5>) = G_SELECT [[ICMP]](s1), [[UV]], [[UV2]]
833 ; CHECK: [[SELECT1:%[0-9]+]]:_(<2 x p5>) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV3]]
834 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x p5>) = G_CONCAT_VECTORS [[SELECT]](<2 x p5>), [[SELECT1]](<2 x p5>)
835 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x p5>)
836 %0:_(s32) = G_CONSTANT i32 0
837 %1:_(s32) = COPY $vgpr0
838 %2:_(<4 x p5>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
839 %3:_(<4 x p5>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
841 %4:_(s1) = G_ICMP intpred(ne), %0, %1
842 %5:_(<4 x p5>) = G_SELECT %4, %2, %3
843 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
848 name: test_select_v2p0
851 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4, $vgpr5_vgpr6_vgpr7_vgpr8
853 ; CHECK-LABEL: name: test_select_v2p0
854 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
855 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
856 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
857 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
858 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
859 ; CHECK: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY1]](<2 x p0>)
860 ; CHECK: [[UV2:%[0-9]+]]:_(p0), [[UV3:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY2]](<2 x p0>)
861 ; CHECK: [[SELECT:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV]], [[UV2]]
862 ; CHECK: [[SELECT1:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV3]]
863 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[SELECT]](p0), [[SELECT1]](p0)
864 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x p0>)
865 %0:_(s32) = G_CONSTANT i32 0
866 %1:_(s32) = COPY $vgpr0
867 %2:_(<2 x p0>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4
868 %3:_(<2 x p0>) = COPY $vgpr5_vgpr6_vgpr7_vgpr8
870 %4:_(s1) = G_ICMP intpred(ne), %0, %1
871 %5:_(<2 x p0>) = G_SELECT %4, %2, %3
872 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
877 name: test_select_v4p0
880 liveins: $vgpr0, $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8, $vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16
882 ; CHECK-LABEL: name: test_select_v4p0
883 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
884 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
885 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x p0>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8
886 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x p0>) = COPY $vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16
887 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
888 ; CHECK: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0), [[UV2:%[0-9]+]]:_(p0), [[UV3:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY1]](<4 x p0>)
889 ; CHECK: [[UV4:%[0-9]+]]:_(p0), [[UV5:%[0-9]+]]:_(p0), [[UV6:%[0-9]+]]:_(p0), [[UV7:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY2]](<4 x p0>)
890 ; CHECK: [[SELECT:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV]], [[UV4]]
891 ; CHECK: [[SELECT1:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV5]]
892 ; CHECK: [[SELECT2:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV2]], [[UV6]]
893 ; CHECK: [[SELECT3:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV3]], [[UV7]]
894 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x p0>) = G_BUILD_VECTOR [[SELECT]](p0), [[SELECT1]](p0), [[SELECT2]](p0), [[SELECT3]](p0)
895 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[BUILD_VECTOR]](<4 x p0>)
896 %0:_(s32) = G_CONSTANT i32 0
897 %1:_(s32) = COPY $vgpr0
898 %2:_(<4 x p0>) = COPY $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8
899 %3:_(<4 x p0>) = COPY $vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16
901 %4:_(s1) = G_ICMP intpred(ne), %0, %1
902 %5:_(<4 x p0>) = G_SELECT %4, %2, %3
903 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %5
908 name: test_select_v2s96
913 ; CHECK-LABEL: name: test_select_v2s96
914 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s96>) = G_IMPLICIT_DEF
915 ; CHECK: [[DEF1:%[0-9]+]]:_(<2 x s96>) = G_IMPLICIT_DEF
916 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
917 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
918 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
919 ; CHECK: [[UV:%[0-9]+]]:_(s96), [[UV1:%[0-9]+]]:_(s96) = G_UNMERGE_VALUES [[DEF]](<2 x s96>)
920 ; CHECK: [[UV2:%[0-9]+]]:_(s96), [[UV3:%[0-9]+]]:_(s96) = G_UNMERGE_VALUES [[DEF1]](<2 x s96>)
921 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[UV]](s96), 0
922 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[UV]](s96), 64
923 ; CHECK: [[EXTRACT2:%[0-9]+]]:_(s64) = G_EXTRACT [[UV2]](s96), 0
924 ; CHECK: [[EXTRACT3:%[0-9]+]]:_(s32) = G_EXTRACT [[UV2]](s96), 64
925 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[EXTRACT]], [[EXTRACT2]]
926 ; CHECK: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[EXTRACT1]], [[EXTRACT3]]
927 ; CHECK: [[DEF2:%[0-9]+]]:_(s96) = G_IMPLICIT_DEF
928 ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[DEF2]], [[SELECT]](s64), 0
929 ; CHECK: [[INSERT1:%[0-9]+]]:_(s96) = G_INSERT [[INSERT]], [[SELECT1]](s32), 64
930 ; CHECK: [[EXTRACT4:%[0-9]+]]:_(s64) = G_EXTRACT [[UV1]](s96), 0
931 ; CHECK: [[EXTRACT5:%[0-9]+]]:_(s32) = G_EXTRACT [[UV1]](s96), 64
932 ; CHECK: [[EXTRACT6:%[0-9]+]]:_(s64) = G_EXTRACT [[UV3]](s96), 0
933 ; CHECK: [[EXTRACT7:%[0-9]+]]:_(s32) = G_EXTRACT [[UV3]](s96), 64
934 ; CHECK: [[SELECT2:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[EXTRACT4]], [[EXTRACT6]]
935 ; CHECK: [[SELECT3:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[EXTRACT5]], [[EXTRACT7]]
936 ; CHECK: [[DEF3:%[0-9]+]]:_(s96) = G_IMPLICIT_DEF
937 ; CHECK: [[INSERT2:%[0-9]+]]:_(s96) = G_INSERT [[DEF3]], [[SELECT2]](s64), 0
938 ; CHECK: [[INSERT3:%[0-9]+]]:_(s96) = G_INSERT [[INSERT2]], [[SELECT3]](s32), 64
939 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s96>) = G_BUILD_VECTOR [[INSERT1]](s96), [[INSERT3]](s96)
940 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s96>)
941 %0:_(<2 x s96>) = G_IMPLICIT_DEF
942 %1:_(<2 x s96>) = G_IMPLICIT_DEF
943 %2:_(s32) = COPY $vgpr0
944 %3:_(s32) = G_CONSTANT i32 0
945 %4:_(s1) = G_ICMP intpred(ne), %2, %3
946 %5:_(<2 x s96>) = G_SELECT %4, %0, %1
953 name: test_select_v8p0
958 ; CHECK-LABEL: name: test_select_v8p0
959 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
960 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
961 ; CHECK: [[DEF:%[0-9]+]]:_(<8 x p0>) = G_IMPLICIT_DEF
962 ; CHECK: [[DEF1:%[0-9]+]]:_(<8 x p0>) = G_IMPLICIT_DEF
963 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
964 ; CHECK: [[UV:%[0-9]+]]:_(p0), [[UV1:%[0-9]+]]:_(p0), [[UV2:%[0-9]+]]:_(p0), [[UV3:%[0-9]+]]:_(p0), [[UV4:%[0-9]+]]:_(p0), [[UV5:%[0-9]+]]:_(p0), [[UV6:%[0-9]+]]:_(p0), [[UV7:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[DEF]](<8 x p0>)
965 ; CHECK: [[UV8:%[0-9]+]]:_(p0), [[UV9:%[0-9]+]]:_(p0), [[UV10:%[0-9]+]]:_(p0), [[UV11:%[0-9]+]]:_(p0), [[UV12:%[0-9]+]]:_(p0), [[UV13:%[0-9]+]]:_(p0), [[UV14:%[0-9]+]]:_(p0), [[UV15:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[DEF1]](<8 x p0>)
966 ; CHECK: [[SELECT:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV]], [[UV8]]
967 ; CHECK: [[SELECT1:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV1]], [[UV9]]
968 ; CHECK: [[SELECT2:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV2]], [[UV10]]
969 ; CHECK: [[SELECT3:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV3]], [[UV11]]
970 ; CHECK: [[SELECT4:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV4]], [[UV12]]
971 ; CHECK: [[SELECT5:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV5]], [[UV13]]
972 ; CHECK: [[SELECT6:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV6]], [[UV14]]
973 ; CHECK: [[SELECT7:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV7]], [[UV15]]
974 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x p0>) = G_BUILD_VECTOR [[SELECT]](p0), [[SELECT1]](p0), [[SELECT2]](p0), [[SELECT3]](p0), [[SELECT4]](p0), [[SELECT5]](p0), [[SELECT6]](p0), [[SELECT7]](p0)
975 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<8 x p0>)
976 %0:_(s32) = G_CONSTANT i32 0
977 %1:_(s32) = COPY $vgpr0
978 %2:_(<8 x p0>) = G_IMPLICIT_DEF
979 %3:_(<8 x p0>) = G_IMPLICIT_DEF
981 %4:_(s1) = G_ICMP intpred(ne), %0, %1
982 %5:_(<8 x p0>) = G_SELECT %4, %2, %3
986 name: test_select_v2s128
989 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, $vgpr16
991 ; CHECK-LABEL: name: test_select_v2s128
992 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
993 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
994 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr16
995 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
996 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[COPY2]](s32), [[C]]
997 ; CHECK: [[UV:%[0-9]+]]:_(s128), [[UV1:%[0-9]+]]:_(s128) = G_UNMERGE_VALUES [[COPY]](<2 x s128>)
998 ; CHECK: [[UV2:%[0-9]+]]:_(s128), [[UV3:%[0-9]+]]:_(s128) = G_UNMERGE_VALUES [[COPY1]](<2 x s128>)
999 ; CHECK: [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[UV]](s128)
1000 ; CHECK: [[UV6:%[0-9]+]]:_(s64), [[UV7:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[UV2]](s128)
1001 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV4]], [[UV6]]
1002 ; CHECK: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV5]], [[UV7]]
1003 ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[SELECT]](s64), [[SELECT1]](s64)
1004 ; CHECK: [[UV8:%[0-9]+]]:_(s64), [[UV9:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[UV1]](s128)
1005 ; CHECK: [[UV10:%[0-9]+]]:_(s64), [[UV11:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[UV3]](s128)
1006 ; CHECK: [[SELECT2:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV8]], [[UV10]]
1007 ; CHECK: [[SELECT3:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV9]], [[UV11]]
1008 ; CHECK: [[MV1:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[SELECT2]](s64), [[SELECT3]](s64)
1009 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s128>) = G_BUILD_VECTOR [[MV]](s128), [[MV1]](s128)
1010 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[BUILD_VECTOR]](<2 x s128>)
1011 %0:_(<2 x s128>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 ,
1012 %1:_(<2 x s128>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
1013 %2:_(s32) = COPY $vgpr16
1014 %3:_(s32) = G_CONSTANT i32 0
1015 %4:_(s1) = G_ICMP intpred(ne), %2, %3
1016 %5:_(<2 x s128>) = G_SELECT %4, %0, %1
1017 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %5
1022 name: test_vselect_v2s32
1025 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7
1026 ; CHECK-LABEL: name: test_vselect_v2s32
1027 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
1028 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1029 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
1030 ; CHECK: [[COPY3:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr6_vgpr7
1031 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
1032 ; CHECK: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
1033 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s32), [[UV2]]
1034 ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s32), [[UV3]]
1035 ; CHECK: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY2]](<2 x s32>)
1036 ; CHECK: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY3]](<2 x s32>)
1037 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[UV4]], [[UV6]]
1038 ; CHECK: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s1), [[UV5]], [[UV7]]
1039 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[SELECT]](s32), [[SELECT1]](s32)
1040 ; CHECK: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
1041 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
1042 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1043 %2:_(<2 x s32>) = COPY $vgpr4_vgpr5
1044 %3:_(<2 x s32>) = COPY $vgpr6_vgpr7
1046 %4:_(<2 x s1>) = G_ICMP intpred(ne), %0, %1
1047 %5:_(<2 x s32>) = G_SELECT %4, %2, %3
1048 $vgpr0_vgpr1 = COPY %5
1053 name: test_vselect_v3s32
1056 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4_vgpr5, $vgpr6_vgpr7_vgpr8
1057 ; CHECK-LABEL: name: test_vselect_v3s32
1058 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
1059 ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr3_vgpr4_vgpr5
1060 ; CHECK: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr6_vgpr7_vgpr8
1061 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
1062 ; CHECK: [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
1063 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s32), [[UV3]]
1064 ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s32), [[UV4]]
1065 ; CHECK: [[ICMP2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV2]](s32), [[UV5]]
1066 ; CHECK: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
1067 ; CHECK: [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY2]](<3 x s32>)
1068 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[UV6]], [[UV9]]
1069 ; CHECK: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s1), [[UV7]], [[UV10]]
1070 ; CHECK: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s1), [[UV8]], [[UV11]]
1071 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[SELECT]](s32), [[SELECT1]](s32), [[SELECT2]](s32)
1072 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
1073 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
1074 %1:_(<3 x s32>) = COPY $vgpr3_vgpr4_vgpr5
1075 %2:_(<3 x s32>) = COPY $vgpr6_vgpr7_vgpr8
1077 %3:_(<3 x s1>) = G_ICMP intpred(ne), %0, %1
1078 %4:_(<3 x s32>) = G_SELECT %3, %1, %2
1079 $vgpr0_vgpr1_vgpr2 = COPY %4
1084 name: test_vselect_v4s32
1087 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
1088 ; CHECK-LABEL: name: test_vselect_v4s32
1089 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1090 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1091 ; CHECK: [[COPY2:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
1092 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
1093 ; CHECK: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
1094 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s32), [[UV4]]
1095 ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s32), [[UV5]]
1096 ; CHECK: [[ICMP2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV2]](s32), [[UV6]]
1097 ; CHECK: [[ICMP3:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV3]](s32), [[UV7]]
1098 ; CHECK: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
1099 ; CHECK: [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY2]](<4 x s32>)
1100 ; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[UV8]], [[UV12]]
1101 ; CHECK: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s1), [[UV9]], [[UV13]]
1102 ; CHECK: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s1), [[UV10]], [[UV14]]
1103 ; CHECK: [[SELECT3:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s1), [[UV11]], [[UV15]]
1104 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[SELECT]](s32), [[SELECT1]](s32), [[SELECT2]](s32), [[SELECT3]](s32)
1105 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
1106 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1107 %1:_(<4 x s32>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1108 %2:_(<4 x s32>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
1110 %3:_(<4 x s1>) = G_ICMP intpred(ne), %0, %1
1111 %4:_(<4 x s32>) = G_SELECT %3, %1, %2
1112 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
1117 name: test_vselect_v2s64
1120 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
1121 ; CHECK-LABEL: name: test_vselect_v2s64
1122 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1123 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1124 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
1125 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
1126 ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
1127 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s64), [[UV2]]
1128 ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s64), [[UV3]]
1129 ; CHECK: [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
1130 ; CHECK: [[UV6:%[0-9]+]]:_(s64), [[UV7:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY2]](<2 x s64>)
1131 ; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[UV4]], [[UV6]]
1132 ; CHECK: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP1]](s1), [[UV5]], [[UV7]]
1133 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[SELECT]](s64), [[SELECT1]](s64)
1134 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
1135 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1136 %1:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1137 %2:_(<2 x s64>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
1139 %3:_(<2 x s1>) = G_ICMP intpred(ne), %0, %1
1140 %4:_(<2 x s64>) = G_SELECT %3, %1, %2
1141 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
1146 name: test_vselect_v2p3
1149 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7
1150 ; CHECK-LABEL: name: test_vselect_v2p3
1151 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
1152 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
1153 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr4_vgpr5
1154 ; CHECK: [[COPY3:%[0-9]+]]:_(<2 x p3>) = COPY $vgpr6_vgpr7
1155 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
1156 ; CHECK: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
1157 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s32), [[UV2]]
1158 ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s32), [[UV3]]
1159 ; CHECK: [[UV4:%[0-9]+]]:_(p3), [[UV5:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY2]](<2 x p3>)
1160 ; CHECK: [[UV6:%[0-9]+]]:_(p3), [[UV7:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[COPY3]](<2 x p3>)
1161 ; CHECK: [[SELECT:%[0-9]+]]:_(p3) = G_SELECT [[ICMP]](s1), [[UV4]], [[UV6]]
1162 ; CHECK: [[SELECT1:%[0-9]+]]:_(p3) = G_SELECT [[ICMP1]](s1), [[UV5]], [[UV7]]
1163 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x p3>) = G_BUILD_VECTOR [[SELECT]](p3), [[SELECT1]](p3)
1164 ; CHECK: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x p3>)
1165 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
1166 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
1167 %2:_(<2 x p3>) = COPY $vgpr4_vgpr5
1168 %3:_(<2 x p3>) = COPY $vgpr6_vgpr7
1170 %4:_(<2 x s1>) = G_ICMP intpred(ne), %0, %1
1171 %5:_(<2 x p3>) = G_SELECT %4, %2, %3
1172 $vgpr0_vgpr1 = COPY %5
1177 name: test_vselect_v2p0
1180 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11, $vgpr12_vgpr13_vgpr14_vgpr15
1182 ; CHECK-LABEL: name: test_vselect_v2p0
1183 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1184 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1185 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
1186 ; CHECK: [[COPY3:%[0-9]+]]:_(<2 x p0>) = COPY $vgpr12_vgpr13_vgpr14_vgpr15
1187 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
1188 ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
1189 ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s64), [[UV2]]
1190 ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s64), [[UV3]]
1191 ; CHECK: [[UV4:%[0-9]+]]:_(p0), [[UV5:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY2]](<2 x p0>)
1192 ; CHECK: [[UV6:%[0-9]+]]:_(p0), [[UV7:%[0-9]+]]:_(p0) = G_UNMERGE_VALUES [[COPY3]](<2 x p0>)
1193 ; CHECK: [[SELECT:%[0-9]+]]:_(p0) = G_SELECT [[ICMP]](s1), [[UV4]], [[UV6]]
1194 ; CHECK: [[SELECT1:%[0-9]+]]:_(p0) = G_SELECT [[ICMP1]](s1), [[UV5]], [[UV7]]
1195 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[SELECT]](p0), [[SELECT1]](p0)
1196 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x p0>)
1197 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1198 %1:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1199 %2:_(<2 x p0>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
1200 %3:_(<2 x p0>) = COPY $vgpr12_vgpr13_vgpr14_vgpr15
1202 %4:_(<2 x s1>) = G_ICMP intpred(ne), %0, %1
1203 %5:_(<2 x p0>) = G_SELECT %4, %2, %3
1204 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5