1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+m,+v -run-pass=regbankselect \
3 # RUN: -simplify-mir -verify-machineinstrs %s \
4 # RUN: -o - | FileCheck -check-prefix=RV32I %s
5 # RUN: llc -mtriple=riscv64 -mattr=+m,+v -run-pass=regbankselect \
6 # RUN: -simplify-mir -verify-machineinstrs %s \
7 # RUN: -o - | FileCheck -check-prefix=RV64I %s
12 tracksRegLiveness: true
15 ; RV32I-LABEL: name: select_nxv1i8
16 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
17 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s8>) = G_IMPLICIT_DEF
18 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s8>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
19 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s8>)
20 ; RV32I-NEXT: PseudoRET implicit $v8
22 ; RV64I-LABEL: name: select_nxv1i8
23 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
24 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s8>) = G_IMPLICIT_DEF
25 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s8>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
26 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s8>)
27 ; RV64I-NEXT: PseudoRET implicit $v8
28 %1:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
29 %2:_(<vscale x 1 x s8>) = G_IMPLICIT_DEF
30 %0:_(<vscale x 1 x s8>) = G_SELECT %1(<vscale x 1 x s1>), %2(<vscale x 1 x s8>), %2(<vscale x 1 x s8>)
31 $v8 = COPY %0(<vscale x 1 x s8>)
32 PseudoRET implicit $v8
37 tracksRegLiveness: true
40 ; RV32I-LABEL: name: select_nxv2i8
41 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
42 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s8>) = G_IMPLICIT_DEF
43 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s8>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
44 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 2 x s8>)
45 ; RV32I-NEXT: PseudoRET implicit $v8
47 ; RV64I-LABEL: name: select_nxv2i8
48 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
49 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s8>) = G_IMPLICIT_DEF
50 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s8>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
51 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 2 x s8>)
52 ; RV64I-NEXT: PseudoRET implicit $v8
53 %1:_(<vscale x 2 x s1>) = G_IMPLICIT_DEF
54 %2:_(<vscale x 2 x s8>) = G_IMPLICIT_DEF
55 %0:_(<vscale x 2 x s8>) = G_SELECT %1(<vscale x 2 x s1>), %2(<vscale x 2 x s8>), %2(<vscale x 2 x s8>)
56 $v8 = COPY %0(<vscale x 2 x s8>)
57 PseudoRET implicit $v8
62 tracksRegLiveness: true
65 ; RV32I-LABEL: name: select_nxv4i8
66 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
67 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s8>) = G_IMPLICIT_DEF
68 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s8>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
69 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 4 x s8>)
70 ; RV32I-NEXT: PseudoRET implicit $v8
72 ; RV64I-LABEL: name: select_nxv4i8
73 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
74 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s8>) = G_IMPLICIT_DEF
75 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s8>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
76 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 4 x s8>)
77 ; RV64I-NEXT: PseudoRET implicit $v8
78 %1:_(<vscale x 4 x s1>) = G_IMPLICIT_DEF
79 %2:_(<vscale x 4 x s8>) = G_IMPLICIT_DEF
80 %0:_(<vscale x 4 x s8>) = G_SELECT %1(<vscale x 4 x s1>), %2(<vscale x 4 x s8>), %2(<vscale x 4 x s8>)
81 $v8 = COPY %0(<vscale x 4 x s8>)
82 PseudoRET implicit $v8
87 tracksRegLiveness: true
90 ; RV32I-LABEL: name: select_nxv8i8
91 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
92 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s8>) = G_IMPLICIT_DEF
93 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s8>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
94 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 8 x s8>)
95 ; RV32I-NEXT: PseudoRET implicit $v8
97 ; RV64I-LABEL: name: select_nxv8i8
98 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
99 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s8>) = G_IMPLICIT_DEF
100 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s8>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
101 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 8 x s8>)
102 ; RV64I-NEXT: PseudoRET implicit $v8
103 %1:_(<vscale x 8 x s1>) = G_IMPLICIT_DEF
104 %2:_(<vscale x 8 x s8>) = G_IMPLICIT_DEF
105 %0:_(<vscale x 8 x s8>) = G_SELECT %1(<vscale x 8 x s1>), %2(<vscale x 8 x s8>), %2(<vscale x 8 x s8>)
106 $v8 = COPY %0(<vscale x 8 x s8>)
107 PseudoRET implicit $v8
112 tracksRegLiveness: true
115 ; RV32I-LABEL: name: select_nxv16i8
116 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_IMPLICIT_DEF
117 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 16 x s8>) = G_IMPLICIT_DEF
118 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 16 x s8>) = G_SELECT [[DEF]](<vscale x 16 x s1>), [[DEF1]], [[DEF1]]
119 ; RV32I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 16 x s8>)
120 ; RV32I-NEXT: PseudoRET implicit $v8m2
122 ; RV64I-LABEL: name: select_nxv16i8
123 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_IMPLICIT_DEF
124 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 16 x s8>) = G_IMPLICIT_DEF
125 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 16 x s8>) = G_SELECT [[DEF]](<vscale x 16 x s1>), [[DEF1]], [[DEF1]]
126 ; RV64I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 16 x s8>)
127 ; RV64I-NEXT: PseudoRET implicit $v8m2
128 %1:_(<vscale x 16 x s1>) = G_IMPLICIT_DEF
129 %2:_(<vscale x 16 x s8>) = G_IMPLICIT_DEF
130 %0:_(<vscale x 16 x s8>) = G_SELECT %1(<vscale x 16 x s1>), %2(<vscale x 16 x s8>), %2(<vscale x 16 x s8>)
131 $v8m2 = COPY %0(<vscale x 16 x s8>)
132 PseudoRET implicit $v8m2
137 tracksRegLiveness: true
140 ; RV32I-LABEL: name: select_nxv32i8
141 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s1>) = G_IMPLICIT_DEF
142 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 32 x s8>) = G_IMPLICIT_DEF
143 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 32 x s8>) = G_SELECT [[DEF]](<vscale x 32 x s1>), [[DEF1]], [[DEF1]]
144 ; RV32I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 32 x s8>)
145 ; RV32I-NEXT: PseudoRET implicit $v8m4
147 ; RV64I-LABEL: name: select_nxv32i8
148 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s1>) = G_IMPLICIT_DEF
149 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 32 x s8>) = G_IMPLICIT_DEF
150 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 32 x s8>) = G_SELECT [[DEF]](<vscale x 32 x s1>), [[DEF1]], [[DEF1]]
151 ; RV64I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 32 x s8>)
152 ; RV64I-NEXT: PseudoRET implicit $v8m4
153 %1:_(<vscale x 32 x s1>) = G_IMPLICIT_DEF
154 %2:_(<vscale x 32 x s8>) = G_IMPLICIT_DEF
155 %0:_(<vscale x 32 x s8>) = G_SELECT %1(<vscale x 32 x s1>), %2(<vscale x 32 x s8>), %2(<vscale x 32 x s8>)
156 $v8m4 = COPY %0(<vscale x 32 x s8>)
157 PseudoRET implicit $v8m4
162 tracksRegLiveness: true
165 ; RV32I-LABEL: name: select_nxv64i8
166 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 64 x s1>) = G_IMPLICIT_DEF
167 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 64 x s8>) = G_IMPLICIT_DEF
168 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 64 x s8>) = G_SELECT [[DEF]](<vscale x 64 x s1>), [[DEF1]], [[DEF1]]
169 ; RV32I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 64 x s8>)
170 ; RV32I-NEXT: PseudoRET implicit $v8m8
172 ; RV64I-LABEL: name: select_nxv64i8
173 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 64 x s1>) = G_IMPLICIT_DEF
174 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 64 x s8>) = G_IMPLICIT_DEF
175 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 64 x s8>) = G_SELECT [[DEF]](<vscale x 64 x s1>), [[DEF1]], [[DEF1]]
176 ; RV64I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 64 x s8>)
177 ; RV64I-NEXT: PseudoRET implicit $v8m8
178 %1:_(<vscale x 64 x s1>) = G_IMPLICIT_DEF
179 %2:_(<vscale x 64 x s8>) = G_IMPLICIT_DEF
180 %0:_(<vscale x 64 x s8>) = G_SELECT %1(<vscale x 64 x s1>), %2(<vscale x 64 x s8>), %2(<vscale x 64 x s8>)
181 $v8m8 = COPY %0(<vscale x 64 x s8>)
182 PseudoRET implicit $v8m8
187 tracksRegLiveness: true
190 ; RV32I-LABEL: name: select_nxv1i16
191 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
192 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s16>) = G_IMPLICIT_DEF
193 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s16>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
194 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s16>)
195 ; RV32I-NEXT: PseudoRET implicit $v8
197 ; RV64I-LABEL: name: select_nxv1i16
198 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
199 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s16>) = G_IMPLICIT_DEF
200 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s16>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
201 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s16>)
202 ; RV64I-NEXT: PseudoRET implicit $v8
203 %1:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
204 %2:_(<vscale x 1 x s16>) = G_IMPLICIT_DEF
205 %0:_(<vscale x 1 x s16>) = G_SELECT %1(<vscale x 1 x s1>), %2(<vscale x 1 x s16>), %2(<vscale x 1 x s16>)
206 $v8 = COPY %0(<vscale x 1 x s16>)
207 PseudoRET implicit $v8
212 tracksRegLiveness: true
215 ; RV32I-LABEL: name: select_nxv2i16
216 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
217 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s16>) = G_IMPLICIT_DEF
218 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s16>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
219 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 2 x s16>)
220 ; RV32I-NEXT: PseudoRET implicit $v8
222 ; RV64I-LABEL: name: select_nxv2i16
223 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
224 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s16>) = G_IMPLICIT_DEF
225 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s16>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
226 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 2 x s16>)
227 ; RV64I-NEXT: PseudoRET implicit $v8
228 %1:_(<vscale x 2 x s1>) = G_IMPLICIT_DEF
229 %2:_(<vscale x 2 x s16>) = G_IMPLICIT_DEF
230 %0:_(<vscale x 2 x s16>) = G_SELECT %1(<vscale x 2 x s1>), %2(<vscale x 2 x s16>), %2(<vscale x 2 x s16>)
231 $v8 = COPY %0(<vscale x 2 x s16>)
232 PseudoRET implicit $v8
237 tracksRegLiveness: true
240 ; RV32I-LABEL: name: select_nxv4i16
241 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
242 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s16>) = G_IMPLICIT_DEF
243 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s16>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
244 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 4 x s16>)
245 ; RV32I-NEXT: PseudoRET implicit $v8
247 ; RV64I-LABEL: name: select_nxv4i16
248 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
249 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s16>) = G_IMPLICIT_DEF
250 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s16>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
251 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 4 x s16>)
252 ; RV64I-NEXT: PseudoRET implicit $v8
253 %1:_(<vscale x 4 x s1>) = G_IMPLICIT_DEF
254 %2:_(<vscale x 4 x s16>) = G_IMPLICIT_DEF
255 %0:_(<vscale x 4 x s16>) = G_SELECT %1(<vscale x 4 x s1>), %2(<vscale x 4 x s16>), %2(<vscale x 4 x s16>)
256 $v8 = COPY %0(<vscale x 4 x s16>)
257 PseudoRET implicit $v8
262 tracksRegLiveness: true
265 ; RV32I-LABEL: name: select_nxv8i16
266 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
267 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s16>) = G_IMPLICIT_DEF
268 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s16>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
269 ; RV32I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 8 x s16>)
270 ; RV32I-NEXT: PseudoRET implicit $v8m2
272 ; RV64I-LABEL: name: select_nxv8i16
273 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
274 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s16>) = G_IMPLICIT_DEF
275 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s16>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
276 ; RV64I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 8 x s16>)
277 ; RV64I-NEXT: PseudoRET implicit $v8m2
278 %1:_(<vscale x 8 x s1>) = G_IMPLICIT_DEF
279 %2:_(<vscale x 8 x s16>) = G_IMPLICIT_DEF
280 %0:_(<vscale x 8 x s16>) = G_SELECT %1(<vscale x 8 x s1>), %2(<vscale x 8 x s16>), %2(<vscale x 8 x s16>)
281 $v8m2 = COPY %0(<vscale x 8 x s16>)
282 PseudoRET implicit $v8m2
285 name: select_nxv16i16
287 tracksRegLiveness: true
290 ; RV32I-LABEL: name: select_nxv16i16
291 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_IMPLICIT_DEF
292 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 16 x s16>) = G_IMPLICIT_DEF
293 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 16 x s16>) = G_SELECT [[DEF]](<vscale x 16 x s1>), [[DEF1]], [[DEF1]]
294 ; RV32I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 16 x s16>)
295 ; RV32I-NEXT: PseudoRET implicit $v8m4
297 ; RV64I-LABEL: name: select_nxv16i16
298 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_IMPLICIT_DEF
299 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 16 x s16>) = G_IMPLICIT_DEF
300 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 16 x s16>) = G_SELECT [[DEF]](<vscale x 16 x s1>), [[DEF1]], [[DEF1]]
301 ; RV64I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 16 x s16>)
302 ; RV64I-NEXT: PseudoRET implicit $v8m4
303 %1:_(<vscale x 16 x s1>) = G_IMPLICIT_DEF
304 %2:_(<vscale x 16 x s16>) = G_IMPLICIT_DEF
305 %0:_(<vscale x 16 x s16>) = G_SELECT %1(<vscale x 16 x s1>), %2(<vscale x 16 x s16>), %2(<vscale x 16 x s16>)
306 $v8m4 = COPY %0(<vscale x 16 x s16>)
307 PseudoRET implicit $v8m4
310 name: select_nxv32i16
312 tracksRegLiveness: true
315 ; RV32I-LABEL: name: select_nxv32i16
316 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s1>) = G_IMPLICIT_DEF
317 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 32 x s16>) = G_IMPLICIT_DEF
318 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 32 x s16>) = G_SELECT [[DEF]](<vscale x 32 x s1>), [[DEF1]], [[DEF1]]
319 ; RV32I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 32 x s16>)
320 ; RV32I-NEXT: PseudoRET implicit $v8m8
322 ; RV64I-LABEL: name: select_nxv32i16
323 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 32 x s1>) = G_IMPLICIT_DEF
324 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 32 x s16>) = G_IMPLICIT_DEF
325 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 32 x s16>) = G_SELECT [[DEF]](<vscale x 32 x s1>), [[DEF1]], [[DEF1]]
326 ; RV64I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 32 x s16>)
327 ; RV64I-NEXT: PseudoRET implicit $v8m8
328 %1:_(<vscale x 32 x s1>) = G_IMPLICIT_DEF
329 %2:_(<vscale x 32 x s16>) = G_IMPLICIT_DEF
330 %0:_(<vscale x 32 x s16>) = G_SELECT %1(<vscale x 32 x s1>), %2(<vscale x 32 x s16>), %2(<vscale x 32 x s16>)
331 $v8m8 = COPY %0(<vscale x 32 x s16>)
332 PseudoRET implicit $v8m8
337 tracksRegLiveness: true
340 ; RV32I-LABEL: name: select_nxv1i32
341 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
342 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s32>) = G_IMPLICIT_DEF
343 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s32>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
344 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s32>)
345 ; RV32I-NEXT: PseudoRET implicit $v8
347 ; RV64I-LABEL: name: select_nxv1i32
348 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
349 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s32>) = G_IMPLICIT_DEF
350 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s32>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
351 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s32>)
352 ; RV64I-NEXT: PseudoRET implicit $v8
353 %1:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
354 %2:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF
355 %0:_(<vscale x 1 x s32>) = G_SELECT %1(<vscale x 1 x s1>), %2(<vscale x 1 x s32>), %2(<vscale x 1 x s32>)
356 $v8 = COPY %0(<vscale x 1 x s32>)
357 PseudoRET implicit $v8
362 tracksRegLiveness: true
365 ; RV32I-LABEL: name: select_nxv2i32
366 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
367 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s32>) = G_IMPLICIT_DEF
368 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s32>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
369 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 2 x s32>)
370 ; RV32I-NEXT: PseudoRET implicit $v8
372 ; RV64I-LABEL: name: select_nxv2i32
373 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
374 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s32>) = G_IMPLICIT_DEF
375 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s32>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
376 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 2 x s32>)
377 ; RV64I-NEXT: PseudoRET implicit $v8
378 %1:_(<vscale x 2 x s1>) = G_IMPLICIT_DEF
379 %2:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
380 %0:_(<vscale x 2 x s32>) = G_SELECT %1(<vscale x 2 x s1>), %2(<vscale x 2 x s32>), %2(<vscale x 2 x s32>)
381 $v8 = COPY %0(<vscale x 2 x s32>)
382 PseudoRET implicit $v8
387 tracksRegLiveness: true
390 ; RV32I-LABEL: name: select_nxv4i32
391 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
392 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s32>) = G_IMPLICIT_DEF
393 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s32>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
394 ; RV32I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 4 x s32>)
395 ; RV32I-NEXT: PseudoRET implicit $v8m2
397 ; RV64I-LABEL: name: select_nxv4i32
398 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
399 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s32>) = G_IMPLICIT_DEF
400 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s32>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
401 ; RV64I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 4 x s32>)
402 ; RV64I-NEXT: PseudoRET implicit $v8m2
403 %1:_(<vscale x 4 x s1>) = G_IMPLICIT_DEF
404 %2:_(<vscale x 4 x s32>) = G_IMPLICIT_DEF
405 %0:_(<vscale x 4 x s32>) = G_SELECT %1(<vscale x 4 x s1>), %2(<vscale x 4 x s32>), %2(<vscale x 4 x s32>)
406 $v8m2 = COPY %0(<vscale x 4 x s32>)
407 PseudoRET implicit $v8m2
412 tracksRegLiveness: true
415 ; RV32I-LABEL: name: select_nxv8i32
416 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
417 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s32>) = G_IMPLICIT_DEF
418 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s32>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
419 ; RV32I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 8 x s32>)
420 ; RV32I-NEXT: PseudoRET implicit $v8m4
422 ; RV64I-LABEL: name: select_nxv8i32
423 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
424 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s32>) = G_IMPLICIT_DEF
425 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s32>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
426 ; RV64I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 8 x s32>)
427 ; RV64I-NEXT: PseudoRET implicit $v8m4
428 %1:_(<vscale x 8 x s1>) = G_IMPLICIT_DEF
429 %2:_(<vscale x 8 x s32>) = G_IMPLICIT_DEF
430 %0:_(<vscale x 8 x s32>) = G_SELECT %1(<vscale x 8 x s1>), %2(<vscale x 8 x s32>), %2(<vscale x 8 x s32>)
431 $v8m4 = COPY %0(<vscale x 8 x s32>)
432 PseudoRET implicit $v8m4
435 name: select_nxv16i32
437 tracksRegLiveness: true
440 ; RV32I-LABEL: name: select_nxv16i32
441 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_IMPLICIT_DEF
442 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 16 x s32>) = G_IMPLICIT_DEF
443 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 16 x s32>) = G_SELECT [[DEF]](<vscale x 16 x s1>), [[DEF1]], [[DEF1]]
444 ; RV32I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 16 x s32>)
445 ; RV32I-NEXT: PseudoRET implicit $v8m8
447 ; RV64I-LABEL: name: select_nxv16i32
448 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 16 x s1>) = G_IMPLICIT_DEF
449 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 16 x s32>) = G_IMPLICIT_DEF
450 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 16 x s32>) = G_SELECT [[DEF]](<vscale x 16 x s1>), [[DEF1]], [[DEF1]]
451 ; RV64I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 16 x s32>)
452 ; RV64I-NEXT: PseudoRET implicit $v8m8
453 %1:_(<vscale x 16 x s1>) = G_IMPLICIT_DEF
454 %2:_(<vscale x 16 x s32>) = G_IMPLICIT_DEF
455 %0:_(<vscale x 16 x s32>) = G_SELECT %1(<vscale x 16 x s1>), %2(<vscale x 16 x s32>), %2(<vscale x 16 x s32>)
456 $v8m8 = COPY %0(<vscale x 16 x s32>)
457 PseudoRET implicit $v8m8
462 tracksRegLiveness: true
465 ; RV32I-LABEL: name: select_nxv1i64
466 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
467 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s64>) = G_IMPLICIT_DEF
468 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s64>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
469 ; RV32I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s64>)
470 ; RV32I-NEXT: PseudoRET implicit $v8
472 ; RV64I-LABEL: name: select_nxv1i64
473 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 1 x s1>) = G_IMPLICIT_DEF
474 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 1 x s64>) = G_IMPLICIT_DEF
475 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 1 x s64>) = G_SELECT [[DEF]](<vscale x 1 x s1>), [[DEF1]], [[DEF1]]
476 ; RV64I-NEXT: $v8 = COPY [[SELECT]](<vscale x 1 x s64>)
477 ; RV64I-NEXT: PseudoRET implicit $v8
478 %1:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
479 %2:_(<vscale x 1 x s64>) = G_IMPLICIT_DEF
480 %0:_(<vscale x 1 x s64>) = G_SELECT %1(<vscale x 1 x s1>), %2(<vscale x 1 x s64>), %2(<vscale x 1 x s64>)
481 $v8 = COPY %0(<vscale x 1 x s64>)
482 PseudoRET implicit $v8
487 tracksRegLiveness: true
490 ; RV32I-LABEL: name: select_nxv2i64
491 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
492 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s64>) = G_IMPLICIT_DEF
493 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s64>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
494 ; RV32I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 2 x s64>)
495 ; RV32I-NEXT: PseudoRET implicit $v8m2
497 ; RV64I-LABEL: name: select_nxv2i64
498 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 2 x s1>) = G_IMPLICIT_DEF
499 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 2 x s64>) = G_IMPLICIT_DEF
500 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 2 x s64>) = G_SELECT [[DEF]](<vscale x 2 x s1>), [[DEF1]], [[DEF1]]
501 ; RV64I-NEXT: $v8m2 = COPY [[SELECT]](<vscale x 2 x s64>)
502 ; RV64I-NEXT: PseudoRET implicit $v8m2
503 %1:_(<vscale x 2 x s1>) = G_IMPLICIT_DEF
504 %2:_(<vscale x 2 x s64>) = G_IMPLICIT_DEF
505 %0:_(<vscale x 2 x s64>) = G_SELECT %1(<vscale x 2 x s1>), %2(<vscale x 2 x s64>), %2(<vscale x 2 x s64>)
506 $v8m2 = COPY %0(<vscale x 2 x s64>)
507 PseudoRET implicit $v8m2
512 tracksRegLiveness: true
515 ; RV32I-LABEL: name: select_nxv4i64
516 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
517 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s64>) = G_IMPLICIT_DEF
518 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s64>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
519 ; RV32I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 4 x s64>)
520 ; RV32I-NEXT: PseudoRET implicit $v8m4
522 ; RV64I-LABEL: name: select_nxv4i64
523 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 4 x s1>) = G_IMPLICIT_DEF
524 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 4 x s64>) = G_IMPLICIT_DEF
525 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 4 x s64>) = G_SELECT [[DEF]](<vscale x 4 x s1>), [[DEF1]], [[DEF1]]
526 ; RV64I-NEXT: $v8m4 = COPY [[SELECT]](<vscale x 4 x s64>)
527 ; RV64I-NEXT: PseudoRET implicit $v8m4
528 %1:_(<vscale x 4 x s1>) = G_IMPLICIT_DEF
529 %2:_(<vscale x 4 x s64>) = G_IMPLICIT_DEF
530 %0:_(<vscale x 4 x s64>) = G_SELECT %1(<vscale x 4 x s1>), %2(<vscale x 4 x s64>), %2(<vscale x 4 x s64>)
531 $v8m4 = COPY %0(<vscale x 4 x s64>)
532 PseudoRET implicit $v8m4
537 tracksRegLiveness: true
540 ; RV32I-LABEL: name: select_nxv8i64
541 ; RV32I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
542 ; RV32I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s64>) = G_IMPLICIT_DEF
543 ; RV32I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s64>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
544 ; RV32I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 8 x s64>)
545 ; RV32I-NEXT: PseudoRET implicit $v8m8
547 ; RV64I-LABEL: name: select_nxv8i64
548 ; RV64I: [[DEF:%[0-9]+]]:vrb(<vscale x 8 x s1>) = G_IMPLICIT_DEF
549 ; RV64I-NEXT: [[DEF1:%[0-9]+]]:vrb(<vscale x 8 x s64>) = G_IMPLICIT_DEF
550 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:vrb(<vscale x 8 x s64>) = G_SELECT [[DEF]](<vscale x 8 x s1>), [[DEF1]], [[DEF1]]
551 ; RV64I-NEXT: $v8m8 = COPY [[SELECT]](<vscale x 8 x s64>)
552 ; RV64I-NEXT: PseudoRET implicit $v8m8
553 %1:_(<vscale x 8 x s1>) = G_IMPLICIT_DEF
554 %2:_(<vscale x 8 x s64>) = G_IMPLICIT_DEF
555 %0:_(<vscale x 8 x s64>) = G_SELECT %1(<vscale x 8 x s1>), %2(<vscale x 8 x s64>), %2(<vscale x 8 x s64>)
556 $v8m8 = COPY %0(<vscale x 8 x s64>)
557 PseudoRET implicit $v8m8