1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -mattr=+v -run-pass=instruction-select -simplify-mir -verify-machineinstrs %s -o - | FileCheck -check-prefix=RV32I %s
3 # RUN: llc -mtriple=riscv64 -mattr=+v -run-pass=instruction-select -simplify-mir -verify-machineinstrs %s -o - | FileCheck -check-prefix=RV64I %s
8 tracksRegLiveness: true
13 ; RV32I-LABEL: name: test_nxv1i8
14 ; RV32I: liveins: $v8, $v9
16 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
17 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
18 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
19 ; RV32I-NEXT: [[PseudoVSUB_VV_MF8_:%[0-9]+]]:vr = PseudoVSUB_VV_MF8 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
20 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF8_]]
21 ; RV32I-NEXT: PseudoRET implicit $v8
23 ; RV64I-LABEL: name: test_nxv1i8
24 ; RV64I: liveins: $v8, $v9
26 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
27 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
28 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
29 ; RV64I-NEXT: [[PseudoVSUB_VV_MF8_:%[0-9]+]]:vr = PseudoVSUB_VV_MF8 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
30 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF8_]]
31 ; RV64I-NEXT: PseudoRET implicit $v8
32 %0:vrb(<vscale x 1 x s8>) = COPY $v8
33 %1:vrb(<vscale x 1 x s8>) = COPY $v9
34 %2:vrb(<vscale x 1 x s8>) = G_SUB %0, %1
35 $v8 = COPY %2(<vscale x 1 x s8>)
36 PseudoRET implicit $v8
43 tracksRegLiveness: true
48 ; RV32I-LABEL: name: test_nxv2i8
49 ; RV32I: liveins: $v8, $v9
51 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
52 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
53 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
54 ; RV32I-NEXT: [[PseudoVSUB_VV_MF4_:%[0-9]+]]:vr = PseudoVSUB_VV_MF4 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
55 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF4_]]
56 ; RV32I-NEXT: PseudoRET implicit $v8
58 ; RV64I-LABEL: name: test_nxv2i8
59 ; RV64I: liveins: $v8, $v9
61 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
62 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
63 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
64 ; RV64I-NEXT: [[PseudoVSUB_VV_MF4_:%[0-9]+]]:vr = PseudoVSUB_VV_MF4 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
65 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF4_]]
66 ; RV64I-NEXT: PseudoRET implicit $v8
67 %0:vrb(<vscale x 2 x s8>) = COPY $v8
68 %1:vrb(<vscale x 2 x s8>) = COPY $v9
69 %2:vrb(<vscale x 2 x s8>) = G_SUB %0, %1
70 $v8 = COPY %2(<vscale x 2 x s8>)
71 PseudoRET implicit $v8
78 tracksRegLiveness: true
83 ; RV32I-LABEL: name: test_nxv4i8
84 ; RV32I: liveins: $v8, $v9
86 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
87 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
88 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
89 ; RV32I-NEXT: [[PseudoVSUB_VV_MF2_:%[0-9]+]]:vr = PseudoVSUB_VV_MF2 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
90 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF2_]]
91 ; RV32I-NEXT: PseudoRET implicit $v8
93 ; RV64I-LABEL: name: test_nxv4i8
94 ; RV64I: liveins: $v8, $v9
96 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
97 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
98 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
99 ; RV64I-NEXT: [[PseudoVSUB_VV_MF2_:%[0-9]+]]:vr = PseudoVSUB_VV_MF2 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
100 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF2_]]
101 ; RV64I-NEXT: PseudoRET implicit $v8
102 %0:vrb(<vscale x 4 x s8>) = COPY $v8
103 %1:vrb(<vscale x 4 x s8>) = COPY $v9
104 %2:vrb(<vscale x 4 x s8>) = G_SUB %0, %1
105 $v8 = COPY %2(<vscale x 4 x s8>)
106 PseudoRET implicit $v8
112 regBankSelected: true
113 tracksRegLiveness: true
118 ; RV32I-LABEL: name: test_nxv8i8
119 ; RV32I: liveins: $v8, $v9
121 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
122 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
123 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
124 ; RV32I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
125 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
126 ; RV32I-NEXT: PseudoRET implicit $v8
128 ; RV64I-LABEL: name: test_nxv8i8
129 ; RV64I: liveins: $v8, $v9
131 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
132 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
133 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
134 ; RV64I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
135 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
136 ; RV64I-NEXT: PseudoRET implicit $v8
137 %0:vrb(<vscale x 8 x s8>) = COPY $v8
138 %1:vrb(<vscale x 8 x s8>) = COPY $v9
139 %2:vrb(<vscale x 8 x s8>) = G_SUB %0, %1
140 $v8 = COPY %2(<vscale x 8 x s8>)
141 PseudoRET implicit $v8
147 regBankSelected: true
148 tracksRegLiveness: true
151 liveins: $v8m2, $v10m2
153 ; RV32I-LABEL: name: test_nxv16i8
154 ; RV32I: liveins: $v8m2, $v10m2
156 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
157 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
158 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
159 ; RV32I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
160 ; RV32I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
161 ; RV32I-NEXT: PseudoRET implicit $v8m2
163 ; RV64I-LABEL: name: test_nxv16i8
164 ; RV64I: liveins: $v8m2, $v10m2
166 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
167 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
168 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
169 ; RV64I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
170 ; RV64I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
171 ; RV64I-NEXT: PseudoRET implicit $v8m2
172 %0:vrb(<vscale x 16 x s8>) = COPY $v8m2
173 %1:vrb(<vscale x 16 x s8>) = COPY $v10m2
174 %2:vrb(<vscale x 16 x s8>) = G_SUB %0, %1
175 $v8m2 = COPY %2(<vscale x 16 x s8>)
176 PseudoRET implicit $v8m2
182 regBankSelected: true
183 tracksRegLiveness: true
186 liveins: $v8m4, $v12m4
188 ; RV32I-LABEL: name: test_nxv32i8
189 ; RV32I: liveins: $v8m4, $v12m4
191 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
192 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
193 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
194 ; RV32I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
195 ; RV32I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
196 ; RV32I-NEXT: PseudoRET implicit $v8m4
198 ; RV64I-LABEL: name: test_nxv32i8
199 ; RV64I: liveins: $v8m4, $v12m4
201 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
202 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
203 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
204 ; RV64I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
205 ; RV64I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
206 ; RV64I-NEXT: PseudoRET implicit $v8m4
207 %0:vrb(<vscale x 32 x s8>) = COPY $v8m4
208 %1:vrb(<vscale x 32 x s8>) = COPY $v12m4
209 %2:vrb(<vscale x 32 x s8>) = G_SUB %0, %1
210 $v8m4 = COPY %2(<vscale x 32 x s8>)
211 PseudoRET implicit $v8m4
217 regBankSelected: true
218 tracksRegLiveness: true
221 liveins: $v8m8, $v16m8
223 ; RV32I-LABEL: name: test_nxv64i8
224 ; RV32I: liveins: $v8m8, $v16m8
226 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
227 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
228 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
229 ; RV32I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
230 ; RV32I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
231 ; RV32I-NEXT: PseudoRET implicit $v8m8
233 ; RV64I-LABEL: name: test_nxv64i8
234 ; RV64I: liveins: $v8m8, $v16m8
236 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
237 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
238 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
239 ; RV64I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 3 /* e8 */, 3 /* ta, ma */
240 ; RV64I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
241 ; RV64I-NEXT: PseudoRET implicit $v8m8
242 %0:vrb(<vscale x 64 x s8>) = COPY $v8m8
243 %1:vrb(<vscale x 64 x s8>) = COPY $v16m8
244 %2:vrb(<vscale x 64 x s8>) = G_SUB %0, %1
245 $v8m8 = COPY %2(<vscale x 64 x s8>)
246 PseudoRET implicit $v8m8
252 regBankSelected: true
253 tracksRegLiveness: true
258 ; RV32I-LABEL: name: test_nxv1i16
259 ; RV32I: liveins: $v8, $v9
261 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
262 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
263 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
264 ; RV32I-NEXT: [[PseudoVSUB_VV_MF4_:%[0-9]+]]:vr = PseudoVSUB_VV_MF4 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
265 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF4_]]
266 ; RV32I-NEXT: PseudoRET implicit $v8
268 ; RV64I-LABEL: name: test_nxv1i16
269 ; RV64I: liveins: $v8, $v9
271 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
272 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
273 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
274 ; RV64I-NEXT: [[PseudoVSUB_VV_MF4_:%[0-9]+]]:vr = PseudoVSUB_VV_MF4 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
275 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF4_]]
276 ; RV64I-NEXT: PseudoRET implicit $v8
277 %0:vrb(<vscale x 1 x s16>) = COPY $v8
278 %1:vrb(<vscale x 1 x s16>) = COPY $v9
279 %2:vrb(<vscale x 1 x s16>) = G_SUB %0, %1
280 $v8 = COPY %2(<vscale x 1 x s16>)
281 PseudoRET implicit $v8
287 regBankSelected: true
288 tracksRegLiveness: true
293 ; RV32I-LABEL: name: test_nxv2i16
294 ; RV32I: liveins: $v8, $v9
296 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
297 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
298 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
299 ; RV32I-NEXT: [[PseudoVSUB_VV_MF2_:%[0-9]+]]:vr = PseudoVSUB_VV_MF2 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
300 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF2_]]
301 ; RV32I-NEXT: PseudoRET implicit $v8
303 ; RV64I-LABEL: name: test_nxv2i16
304 ; RV64I: liveins: $v8, $v9
306 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
307 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
308 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
309 ; RV64I-NEXT: [[PseudoVSUB_VV_MF2_:%[0-9]+]]:vr = PseudoVSUB_VV_MF2 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
310 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF2_]]
311 ; RV64I-NEXT: PseudoRET implicit $v8
312 %0:vrb(<vscale x 2 x s16>) = COPY $v8
313 %1:vrb(<vscale x 2 x s16>) = COPY $v9
314 %2:vrb(<vscale x 2 x s16>) = G_SUB %0, %1
315 $v8 = COPY %2(<vscale x 2 x s16>)
316 PseudoRET implicit $v8
322 regBankSelected: true
323 tracksRegLiveness: true
328 ; RV32I-LABEL: name: test_nxv4i16
329 ; RV32I: liveins: $v8, $v9
331 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
332 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
333 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
334 ; RV32I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
335 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
336 ; RV32I-NEXT: PseudoRET implicit $v8
338 ; RV64I-LABEL: name: test_nxv4i16
339 ; RV64I: liveins: $v8, $v9
341 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
342 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
343 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
344 ; RV64I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
345 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
346 ; RV64I-NEXT: PseudoRET implicit $v8
347 %0:vrb(<vscale x 4 x s16>) = COPY $v8
348 %1:vrb(<vscale x 4 x s16>) = COPY $v9
349 %2:vrb(<vscale x 4 x s16>) = G_SUB %0, %1
350 $v8 = COPY %2(<vscale x 4 x s16>)
351 PseudoRET implicit $v8
357 regBankSelected: true
358 tracksRegLiveness: true
361 liveins: $v8m2, $v10m2
363 ; RV32I-LABEL: name: test_nxv8i16
364 ; RV32I: liveins: $v8m2, $v10m2
366 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
367 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
368 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
369 ; RV32I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
370 ; RV32I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
371 ; RV32I-NEXT: PseudoRET implicit $v8m2
373 ; RV64I-LABEL: name: test_nxv8i16
374 ; RV64I: liveins: $v8m2, $v10m2
376 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
377 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
378 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
379 ; RV64I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
380 ; RV64I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
381 ; RV64I-NEXT: PseudoRET implicit $v8m2
382 %0:vrb(<vscale x 8 x s16>) = COPY $v8m2
383 %1:vrb(<vscale x 8 x s16>) = COPY $v10m2
384 %2:vrb(<vscale x 8 x s16>) = G_SUB %0, %1
385 $v8m2 = COPY %2(<vscale x 8 x s16>)
386 PseudoRET implicit $v8m2
392 regBankSelected: true
393 tracksRegLiveness: true
396 liveins: $v8m4, $v12m4
398 ; RV32I-LABEL: name: test_nxv16i16
399 ; RV32I: liveins: $v8m4, $v12m4
401 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
402 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
403 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
404 ; RV32I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
405 ; RV32I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
406 ; RV32I-NEXT: PseudoRET implicit $v8m4
408 ; RV64I-LABEL: name: test_nxv16i16
409 ; RV64I: liveins: $v8m4, $v12m4
411 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
412 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
413 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
414 ; RV64I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
415 ; RV64I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
416 ; RV64I-NEXT: PseudoRET implicit $v8m4
417 %0:vrb(<vscale x 16 x s16>) = COPY $v8m4
418 %1:vrb(<vscale x 16 x s16>) = COPY $v12m4
419 %2:vrb(<vscale x 16 x s16>) = G_SUB %0, %1
420 $v8m4 = COPY %2(<vscale x 16 x s16>)
421 PseudoRET implicit $v8m4
427 regBankSelected: true
428 tracksRegLiveness: true
431 liveins: $v8m8, $v16m8
433 ; RV32I-LABEL: name: test_nxv32i16
434 ; RV32I: liveins: $v8m8, $v16m8
436 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
437 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
438 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
439 ; RV32I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
440 ; RV32I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
441 ; RV32I-NEXT: PseudoRET implicit $v8m8
443 ; RV64I-LABEL: name: test_nxv32i16
444 ; RV64I: liveins: $v8m8, $v16m8
446 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
447 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
448 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
449 ; RV64I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 4 /* e16 */, 3 /* ta, ma */
450 ; RV64I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
451 ; RV64I-NEXT: PseudoRET implicit $v8m8
452 %0:vrb(<vscale x 32 x s16>) = COPY $v8m8
453 %1:vrb(<vscale x 32 x s16>) = COPY $v16m8
454 %2:vrb(<vscale x 32 x s16>) = G_SUB %0, %1
455 $v8m8 = COPY %2(<vscale x 32 x s16>)
456 PseudoRET implicit $v8m8
462 regBankSelected: true
463 tracksRegLiveness: true
468 ; RV32I-LABEL: name: test_nxv1i32
469 ; RV32I: liveins: $v8, $v9
471 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
472 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
473 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
474 ; RV32I-NEXT: [[PseudoVSUB_VV_MF2_:%[0-9]+]]:vr = PseudoVSUB_VV_MF2 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
475 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF2_]]
476 ; RV32I-NEXT: PseudoRET implicit $v8
478 ; RV64I-LABEL: name: test_nxv1i32
479 ; RV64I: liveins: $v8, $v9
481 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
482 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
483 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
484 ; RV64I-NEXT: [[PseudoVSUB_VV_MF2_:%[0-9]+]]:vr = PseudoVSUB_VV_MF2 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
485 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_MF2_]]
486 ; RV64I-NEXT: PseudoRET implicit $v8
487 %0:vrb(<vscale x 1 x s32>) = COPY $v8
488 %1:vrb(<vscale x 1 x s32>) = COPY $v9
489 %2:vrb(<vscale x 1 x s32>) = G_SUB %0, %1
490 $v8 = COPY %2(<vscale x 1 x s32>)
491 PseudoRET implicit $v8
497 regBankSelected: true
498 tracksRegLiveness: true
503 ; RV32I-LABEL: name: test_nxv2i32
504 ; RV32I: liveins: $v8, $v9
506 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
507 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
508 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
509 ; RV32I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
510 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
511 ; RV32I-NEXT: PseudoRET implicit $v8
513 ; RV64I-LABEL: name: test_nxv2i32
514 ; RV64I: liveins: $v8, $v9
516 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
517 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
518 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
519 ; RV64I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
520 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
521 ; RV64I-NEXT: PseudoRET implicit $v8
522 %0:vrb(<vscale x 2 x s32>) = COPY $v8
523 %1:vrb(<vscale x 2 x s32>) = COPY $v9
524 %2:vrb(<vscale x 2 x s32>) = G_SUB %0, %1
525 $v8 = COPY %2(<vscale x 2 x s32>)
526 PseudoRET implicit $v8
532 regBankSelected: true
533 tracksRegLiveness: true
536 liveins: $v8m2, $v10m2
538 ; RV32I-LABEL: name: test_nxv4i32
539 ; RV32I: liveins: $v8m2, $v10m2
541 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
542 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
543 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
544 ; RV32I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
545 ; RV32I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
546 ; RV32I-NEXT: PseudoRET implicit $v8m2
548 ; RV64I-LABEL: name: test_nxv4i32
549 ; RV64I: liveins: $v8m2, $v10m2
551 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
552 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
553 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
554 ; RV64I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
555 ; RV64I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
556 ; RV64I-NEXT: PseudoRET implicit $v8m2
557 %0:vrb(<vscale x 4 x s32>) = COPY $v8m2
558 %1:vrb(<vscale x 4 x s32>) = COPY $v10m2
559 %2:vrb(<vscale x 4 x s32>) = G_SUB %0, %1
560 $v8m2 = COPY %2(<vscale x 4 x s32>)
561 PseudoRET implicit $v8m2
567 regBankSelected: true
568 tracksRegLiveness: true
571 liveins: $v8m4, $v12m4
573 ; RV32I-LABEL: name: test_nxv8i32
574 ; RV32I: liveins: $v8m4, $v12m4
576 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
577 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
578 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
579 ; RV32I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
580 ; RV32I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
581 ; RV32I-NEXT: PseudoRET implicit $v8m4
583 ; RV64I-LABEL: name: test_nxv8i32
584 ; RV64I: liveins: $v8m4, $v12m4
586 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
587 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
588 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
589 ; RV64I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
590 ; RV64I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
591 ; RV64I-NEXT: PseudoRET implicit $v8m4
592 %0:vrb(<vscale x 8 x s32>) = COPY $v8m4
593 %1:vrb(<vscale x 8 x s32>) = COPY $v12m4
594 %2:vrb(<vscale x 8 x s32>) = G_SUB %0, %1
595 $v8m4 = COPY %2(<vscale x 8 x s32>)
596 PseudoRET implicit $v8m4
602 regBankSelected: true
603 tracksRegLiveness: true
606 liveins: $v8m8, $v16m8
608 ; RV32I-LABEL: name: test_nxv16i32
609 ; RV32I: liveins: $v8m8, $v16m8
611 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
612 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
613 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
614 ; RV32I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
615 ; RV32I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
616 ; RV32I-NEXT: PseudoRET implicit $v8m8
618 ; RV64I-LABEL: name: test_nxv16i32
619 ; RV64I: liveins: $v8m8, $v16m8
621 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
622 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
623 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
624 ; RV64I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 5 /* e32 */, 3 /* ta, ma */
625 ; RV64I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
626 ; RV64I-NEXT: PseudoRET implicit $v8m8
627 %0:vrb(<vscale x 16 x s32>) = COPY $v8m8
628 %1:vrb(<vscale x 16 x s32>) = COPY $v16m8
629 %2:vrb(<vscale x 16 x s32>) = G_SUB %0, %1
630 $v8m8 = COPY %2(<vscale x 16 x s32>)
631 PseudoRET implicit $v8m8
637 regBankSelected: true
638 tracksRegLiveness: true
643 ; RV32I-LABEL: name: test_nxv1i64
644 ; RV32I: liveins: $v8, $v9
646 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
647 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
648 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
649 ; RV32I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
650 ; RV32I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
651 ; RV32I-NEXT: PseudoRET implicit $v8
653 ; RV64I-LABEL: name: test_nxv1i64
654 ; RV64I: liveins: $v8, $v9
656 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
657 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vr = COPY $v9
658 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vr = IMPLICIT_DEF
659 ; RV64I-NEXT: [[PseudoVSUB_VV_M1_:%[0-9]+]]:vr = PseudoVSUB_VV_M1 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
660 ; RV64I-NEXT: $v8 = COPY [[PseudoVSUB_VV_M1_]]
661 ; RV64I-NEXT: PseudoRET implicit $v8
662 %0:vrb(<vscale x 1 x s64>) = COPY $v8
663 %1:vrb(<vscale x 1 x s64>) = COPY $v9
664 %2:vrb(<vscale x 1 x s64>) = G_SUB %0, %1
665 $v8 = COPY %2(<vscale x 1 x s64>)
666 PseudoRET implicit $v8
672 regBankSelected: true
673 tracksRegLiveness: true
676 liveins: $v8m2, $v10m2
678 ; RV32I-LABEL: name: test_nxv2i64
679 ; RV32I: liveins: $v8m2, $v10m2
681 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
682 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
683 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
684 ; RV32I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
685 ; RV32I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
686 ; RV32I-NEXT: PseudoRET implicit $v8m2
688 ; RV64I-LABEL: name: test_nxv2i64
689 ; RV64I: liveins: $v8m2, $v10m2
691 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm2 = COPY $v8m2
692 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm2 = COPY $v10m2
693 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm2 = IMPLICIT_DEF
694 ; RV64I-NEXT: [[PseudoVSUB_VV_M2_:%[0-9]+]]:vrm2 = PseudoVSUB_VV_M2 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
695 ; RV64I-NEXT: $v8m2 = COPY [[PseudoVSUB_VV_M2_]]
696 ; RV64I-NEXT: PseudoRET implicit $v8m2
697 %0:vrb(<vscale x 2 x s64>) = COPY $v8m2
698 %1:vrb(<vscale x 2 x s64>) = COPY $v10m2
699 %2:vrb(<vscale x 2 x s64>) = G_SUB %0, %1
700 $v8m2 = COPY %2(<vscale x 2 x s64>)
701 PseudoRET implicit $v8m2
707 regBankSelected: true
708 tracksRegLiveness: true
711 liveins: $v8m4, $v12m4
713 ; RV32I-LABEL: name: test_nxv4i64
714 ; RV32I: liveins: $v8m4, $v12m4
716 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
717 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
718 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
719 ; RV32I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
720 ; RV32I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
721 ; RV32I-NEXT: PseudoRET implicit $v8m4
723 ; RV64I-LABEL: name: test_nxv4i64
724 ; RV64I: liveins: $v8m4, $v12m4
726 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm4 = COPY $v8m4
727 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm4 = COPY $v12m4
728 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm4 = IMPLICIT_DEF
729 ; RV64I-NEXT: [[PseudoVSUB_VV_M4_:%[0-9]+]]:vrm4 = PseudoVSUB_VV_M4 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
730 ; RV64I-NEXT: $v8m4 = COPY [[PseudoVSUB_VV_M4_]]
731 ; RV64I-NEXT: PseudoRET implicit $v8m4
732 %0:vrb(<vscale x 4 x s64>) = COPY $v8m4
733 %1:vrb(<vscale x 4 x s64>) = COPY $v12m4
734 %2:vrb(<vscale x 4 x s64>) = G_SUB %0, %1
735 $v8m4 = COPY %2(<vscale x 4 x s64>)
736 PseudoRET implicit $v8m4
742 regBankSelected: true
743 tracksRegLiveness: true
746 liveins: $v8m8, $v16m8
748 ; RV32I-LABEL: name: test_nxv8i64
749 ; RV32I: liveins: $v8m8, $v16m8
751 ; RV32I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
752 ; RV32I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
753 ; RV32I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
754 ; RV32I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
755 ; RV32I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
756 ; RV32I-NEXT: PseudoRET implicit $v8m8
758 ; RV64I-LABEL: name: test_nxv8i64
759 ; RV64I: liveins: $v8m8, $v16m8
761 ; RV64I-NEXT: [[COPY:%[0-9]+]]:vrm8 = COPY $v8m8
762 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:vrm8 = COPY $v16m8
763 ; RV64I-NEXT: [[DEF:%[0-9]+]]:vrm8 = IMPLICIT_DEF
764 ; RV64I-NEXT: [[PseudoVSUB_VV_M8_:%[0-9]+]]:vrm8 = PseudoVSUB_VV_M8 [[DEF]], [[COPY]], [[COPY1]], -1, 6 /* e64 */, 3 /* ta, ma */
765 ; RV64I-NEXT: $v8m8 = COPY [[PseudoVSUB_VV_M8_]]
766 ; RV64I-NEXT: PseudoRET implicit $v8m8
767 %0:vrb(<vscale x 8 x s64>) = COPY $v8m8
768 %1:vrb(<vscale x 8 x s64>) = COPY $v16m8
769 %2:vrb(<vscale x 8 x s64>) = G_SUB %0, %1
770 $v8m8 = COPY %2(<vscale x 8 x s64>)
771 PseudoRET implicit $v8m8