1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=instruction-select -simplify-mir -verify-machineinstrs %s -o - \
3 # RUN: | FileCheck -check-prefix=RV64I %s
9 tracksRegLiveness: true
14 ; RV64I-LABEL: name: add_i8_zeroext
15 ; RV64I: liveins: $x10, $x11
17 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
18 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
19 ; RV64I-NEXT: [[ADDW:%[0-9]+]]:gpr = ADDW [[COPY]], [[COPY1]]
20 ; RV64I-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[ADDW]], 255
21 ; RV64I-NEXT: $x10 = COPY [[ANDI]]
22 ; RV64I-NEXT: PseudoRET implicit $x10
23 %2:gprb(s64) = COPY $x10
24 %3:gprb(s64) = COPY $x11
25 %6:gprb(s32) = G_TRUNC %2(s64)
26 %7:gprb(s32) = G_TRUNC %3(s64)
27 %8:gprb(s32) = G_ADD %6, %7
28 %9:gprb(s64) = G_CONSTANT i64 255
29 %10:gprb(s64) = G_ANYEXT %8(s32)
30 %5:gprb(s64) = G_AND %10, %9
32 PseudoRET implicit $x10
39 tracksRegLiveness: true
44 ; RV64I-LABEL: name: add_i16_signext
45 ; RV64I: liveins: $x10, $x11
47 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
48 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
49 ; RV64I-NEXT: [[ADDW:%[0-9]+]]:gpr = ADDW [[COPY]], [[COPY1]]
50 ; RV64I-NEXT: [[SLLI:%[0-9]+]]:gpr = SLLI [[ADDW]], 48
51 ; RV64I-NEXT: [[SRAI:%[0-9]+]]:gpr = SRAI [[SLLI]], 48
52 ; RV64I-NEXT: $x10 = COPY [[SRAI]]
53 ; RV64I-NEXT: PseudoRET implicit $x10
54 %2:gprb(s64) = COPY $x10
55 %3:gprb(s64) = COPY $x11
56 %6:gprb(s32) = G_TRUNC %2(s64)
57 %7:gprb(s32) = G_TRUNC %3(s64)
58 %8:gprb(s32) = G_ADD %6, %7
59 %9:gprb(s64) = G_ANYEXT %8(s32)
60 %11:gprb(s64) = G_CONSTANT i64 48
61 %10:gprb(s64) = G_SHL %9, %11(s64)
62 %5:gprb(s64) = G_ASHR %10, %11(s64)
64 PseudoRET implicit $x10
71 tracksRegLiveness: true
76 ; RV64I-LABEL: name: add_i16_zeroext
77 ; RV64I: liveins: $x10, $x11
79 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
80 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
81 ; RV64I-NEXT: [[ADDW:%[0-9]+]]:gpr = ADDW [[COPY]], [[COPY1]]
82 ; RV64I-NEXT: [[LUI:%[0-9]+]]:gpr = LUI 16
83 ; RV64I-NEXT: [[ADDIW:%[0-9]+]]:gpr = ADDIW [[LUI]], -1
84 ; RV64I-NEXT: [[AND:%[0-9]+]]:gpr = AND [[ADDW]], [[ADDIW]]
85 ; RV64I-NEXT: $x10 = COPY [[AND]]
86 ; RV64I-NEXT: PseudoRET implicit $x10
87 %2:gprb(s64) = COPY $x10
88 %3:gprb(s64) = COPY $x11
89 %6:gprb(s32) = G_TRUNC %2(s64)
90 %7:gprb(s32) = G_TRUNC %3(s64)
91 %8:gprb(s32) = G_ADD %6, %7
92 %9:gprb(s64) = G_CONSTANT i64 65535
93 %10:gprb(s64) = G_ANYEXT %8(s32)
94 %5:gprb(s64) = G_AND %10, %9
96 PseudoRET implicit $x10
102 regBankSelected: true
103 tracksRegLiveness: true
108 ; RV64I-LABEL: name: add_i32
109 ; RV64I: liveins: $x10, $x11
111 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
112 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
113 ; RV64I-NEXT: [[ADDW:%[0-9]+]]:gpr = ADDW [[COPY]], [[COPY1]]
114 ; RV64I-NEXT: $x10 = COPY [[ADDW]]
115 ; RV64I-NEXT: PseudoRET implicit $x10
116 %0:gprb(s64) = COPY $x10
117 %1:gprb(s32) = G_TRUNC %0(s64)
118 %2:gprb(s64) = COPY $x11
119 %3:gprb(s32) = G_TRUNC %2(s64)
120 %4:gprb(s32) = G_ADD %1, %3
121 %5:gprb(s64) = G_ANYEXT %4(s32)
123 PseudoRET implicit $x10
129 regBankSelected: true
130 tracksRegLiveness: true
135 ; RV64I-LABEL: name: addi_i32
136 ; RV64I: liveins: $x10
138 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
139 ; RV64I-NEXT: [[ADDIW:%[0-9]+]]:gpr = ADDIW [[COPY]], 1234
140 ; RV64I-NEXT: $x10 = COPY [[ADDIW]]
141 ; RV64I-NEXT: PseudoRET implicit $x10
142 %0:gprb(s64) = COPY $x10
143 %1:gprb(s32) = G_TRUNC %0(s64)
144 %2:gprb(s32) = G_CONSTANT i32 1234
145 %3:gprb(s32) = G_ADD %1, %2
146 %4:gprb(s64) = G_ANYEXT %3(s32)
148 PseudoRET implicit $x10
154 regBankSelected: true
155 tracksRegLiveness: true
160 ; RV64I-LABEL: name: sub_i32
161 ; RV64I: liveins: $x10, $x11
163 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
164 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
165 ; RV64I-NEXT: [[SUBW:%[0-9]+]]:gpr = SUBW [[COPY]], [[COPY1]]
166 ; RV64I-NEXT: $x10 = COPY [[SUBW]]
167 ; RV64I-NEXT: PseudoRET implicit $x10
168 %0:gprb(s64) = COPY $x10
169 %1:gprb(s32) = G_TRUNC %0(s64)
170 %2:gprb(s64) = COPY $x11
171 %3:gprb(s32) = G_TRUNC %2(s64)
172 %4:gprb(s32) = G_SUB %1, %3
173 %5:gprb(s64) = G_ANYEXT %4(s32)
175 PseudoRET implicit $x10
181 regBankSelected: true
182 tracksRegLiveness: true
187 ; RV64I-LABEL: name: subi_i32
188 ; RV64I: liveins: $x10
190 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
191 ; RV64I-NEXT: [[ADDIW:%[0-9]+]]:gpr = ADDIW [[COPY]], 1234
192 ; RV64I-NEXT: $x10 = COPY [[ADDIW]]
193 ; RV64I-NEXT: PseudoRET implicit $x10
194 %0:gprb(s64) = COPY $x10
195 %1:gprb(s32) = G_TRUNC %0(s64)
196 %2:gprb(s32) = G_CONSTANT i32 -1234
197 %3:gprb(s32) = G_SUB %1, %2
198 %4:gprb(s64) = G_ANYEXT %3(s32)
200 PseudoRET implicit $x10
206 regBankSelected: true
207 tracksRegLiveness: true
212 ; RV64I-LABEL: name: sll_i32
213 ; RV64I: liveins: $x10, $x11
215 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
216 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
217 ; RV64I-NEXT: [[SLLW:%[0-9]+]]:gpr = SLLW [[COPY]], [[COPY1]]
218 ; RV64I-NEXT: $x10 = COPY [[SLLW]]
219 ; RV64I-NEXT: PseudoRET implicit $x10
220 %0:gprb(s64) = COPY $x10
221 %1:gprb(s32) = G_TRUNC %0(s64)
222 %2:gprb(s64) = COPY $x11
223 %3:gprb(s32) = G_TRUNC %2(s64)
224 %4:gprb(s32) = G_SHL %1, %3(s32)
225 %5:gprb(s64) = G_ANYEXT %4(s32)
227 PseudoRET implicit $x10
233 regBankSelected: true
234 tracksRegLiveness: true
239 ; RV64I-LABEL: name: slli_i32
240 ; RV64I: liveins: $x10
242 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
243 ; RV64I-NEXT: [[SLLIW:%[0-9]+]]:gpr = SLLIW [[COPY]], 31
244 ; RV64I-NEXT: $x10 = COPY [[SLLIW]]
245 ; RV64I-NEXT: PseudoRET implicit $x10
246 %0:gprb(s64) = COPY $x10
247 %1:gprb(s32) = G_TRUNC %0(s64)
248 %2:gprb(s64) = G_CONSTANT i64 31
249 %3:gprb(s32) = G_SHL %1, %2(s64)
250 %4:gprb(s64) = G_ANYEXT %3(s32)
252 PseudoRET implicit $x10
258 regBankSelected: true
259 tracksRegLiveness: true
264 ; RV64I-LABEL: name: sra_i32
265 ; RV64I: liveins: $x10, $x11
267 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
268 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
269 ; RV64I-NEXT: [[SRAW:%[0-9]+]]:gpr = SRAW [[COPY]], [[COPY1]]
270 ; RV64I-NEXT: $x10 = COPY [[SRAW]]
271 ; RV64I-NEXT: PseudoRET implicit $x10
272 %0:gprb(s64) = COPY $x10
273 %1:gprb(s32) = G_TRUNC %0(s64)
274 %2:gprb(s64) = COPY $x11
275 %3:gprb(s32) = G_TRUNC %2(s64)
276 %4:gprb(s32) = G_ASHR %1, %3(s32)
277 %5:gprb(s64) = G_ANYEXT %4(s32)
279 PseudoRET implicit $x10
285 regBankSelected: true
286 tracksRegLiveness: true
291 ; RV64I-LABEL: name: srai_i32
292 ; RV64I: liveins: $x10
294 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
295 ; RV64I-NEXT: [[SRAIW:%[0-9]+]]:gpr = SRAIW [[COPY]], 31
296 ; RV64I-NEXT: $x10 = COPY [[SRAIW]]
297 ; RV64I-NEXT: PseudoRET implicit $x10
298 %0:gprb(s64) = COPY $x10
299 %1:gprb(s32) = G_TRUNC %0(s64)
300 %2:gprb(s64) = G_CONSTANT i64 31
301 %3:gprb(s32) = G_ASHR %1, %2(s64)
302 %4:gprb(s64) = G_ANYEXT %3(s32)
304 PseudoRET implicit $x10
310 regBankSelected: true
311 tracksRegLiveness: true
316 ; RV64I-LABEL: name: srl_i32
317 ; RV64I: liveins: $x10, $x11
319 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
320 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
321 ; RV64I-NEXT: [[SRLW:%[0-9]+]]:gpr = SRLW [[COPY]], [[COPY1]]
322 ; RV64I-NEXT: $x10 = COPY [[SRLW]]
323 ; RV64I-NEXT: PseudoRET implicit $x10
324 %0:gprb(s64) = COPY $x10
325 %1:gprb(s32) = G_TRUNC %0(s64)
326 %2:gprb(s64) = COPY $x11
327 %3:gprb(s32) = G_TRUNC %2(s64)
328 %4:gprb(s32) = G_LSHR %1, %3(s32)
329 %5:gprb(s64) = G_ANYEXT %4(s32)
331 PseudoRET implicit $x10
337 regBankSelected: true
338 tracksRegLiveness: true
343 ; RV64I-LABEL: name: srli_i32
344 ; RV64I: liveins: $x10
346 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
347 ; RV64I-NEXT: [[SRLIW:%[0-9]+]]:gpr = SRLIW [[COPY]], 31
348 ; RV64I-NEXT: $x10 = COPY [[SRLIW]]
349 ; RV64I-NEXT: PseudoRET implicit $x10
350 %0:gprb(s64) = COPY $x10
351 %1:gprb(s32) = G_TRUNC %0(s64)
352 %2:gprb(s64) = G_CONSTANT i64 31
353 %3:gprb(s32) = G_LSHR %1, %2(s64)
354 %4:gprb(s64) = G_ANYEXT %3(s32)
356 PseudoRET implicit $x10
362 regBankSelected: true
363 tracksRegLiveness: true
368 ; RV64I-LABEL: name: add_i64
369 ; RV64I: liveins: $x10, $x11
371 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
372 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
373 ; RV64I-NEXT: [[ADD:%[0-9]+]]:gpr = ADD [[COPY]], [[COPY1]]
374 ; RV64I-NEXT: $x10 = COPY [[ADD]]
375 ; RV64I-NEXT: PseudoRET implicit $x10
376 %0:gprb(s64) = COPY $x10
377 %1:gprb(s64) = COPY $x11
378 %2:gprb(s64) = G_ADD %0, %1
380 PseudoRET implicit $x10
386 regBankSelected: true
387 tracksRegLiveness: true
392 ; RV64I-LABEL: name: addi_i64
393 ; RV64I: liveins: $x10
395 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
396 ; RV64I-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[COPY]], 1234
397 ; RV64I-NEXT: $x10 = COPY [[ADDI]]
398 ; RV64I-NEXT: PseudoRET implicit $x10
399 %0:gprb(s64) = COPY $x10
400 %1:gprb(s64) = G_CONSTANT i64 1234
401 %2:gprb(s64) = G_ADD %0, %1
403 PseudoRET implicit $x10
409 regBankSelected: true
410 tracksRegLiveness: true
415 ; RV64I-LABEL: name: sub_i64
416 ; RV64I: liveins: $x10, $x11
418 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
419 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
420 ; RV64I-NEXT: [[SUB:%[0-9]+]]:gpr = SUB [[COPY]], [[COPY1]]
421 ; RV64I-NEXT: $x10 = COPY [[SUB]]
422 ; RV64I-NEXT: PseudoRET implicit $x10
423 %0:gprb(s64) = COPY $x10
424 %1:gprb(s64) = COPY $x11
425 %2:gprb(s64) = G_SUB %0, %1
427 PseudoRET implicit $x10
433 regBankSelected: true
434 tracksRegLiveness: true
439 ; RV64I-LABEL: name: subi_i64
440 ; RV64I: liveins: $x10
442 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
443 ; RV64I-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[COPY]], 1234
444 ; RV64I-NEXT: $x10 = COPY [[ADDI]]
445 ; RV64I-NEXT: PseudoRET implicit $x10
446 %0:gprb(s64) = COPY $x10
447 %1:gprb(s64) = G_CONSTANT i64 -1234
448 %2:gprb(s64) = G_SUB %0, %1
450 PseudoRET implicit $x10
456 regBankSelected: true
457 tracksRegLiveness: true
462 ; RV64I-LABEL: name: sll_i64
463 ; RV64I: liveins: $x10, $x11
465 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
466 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
467 ; RV64I-NEXT: [[SLL:%[0-9]+]]:gpr = SLL [[COPY]], [[COPY1]]
468 ; RV64I-NEXT: $x10 = COPY [[SLL]]
469 ; RV64I-NEXT: PseudoRET implicit $x10
470 %0:gprb(s64) = COPY $x10
471 %1:gprb(s64) = COPY $x11
472 %2:gprb(s64) = G_SHL %0, %1
474 PseudoRET implicit $x10
480 regBankSelected: true
481 tracksRegLiveness: true
486 ; RV64I-LABEL: name: slli_i64
487 ; RV64I: liveins: $x10
489 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
490 ; RV64I-NEXT: [[SLLI:%[0-9]+]]:gpr = SLLI [[COPY]], 63
491 ; RV64I-NEXT: $x10 = COPY [[SLLI]]
492 ; RV64I-NEXT: PseudoRET implicit $x10
493 %0:gprb(s64) = COPY $x10
494 %1:gprb(s64) = G_CONSTANT i64 63
495 %2:gprb(s64) = G_SHL %0, %1
497 PseudoRET implicit $x10
503 regBankSelected: true
504 tracksRegLiveness: true
509 ; RV64I-LABEL: name: sra_i64
510 ; RV64I: liveins: $x10, $x11
512 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
513 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
514 ; RV64I-NEXT: [[SRA:%[0-9]+]]:gpr = SRA [[COPY]], [[COPY1]]
515 ; RV64I-NEXT: $x10 = COPY [[SRA]]
516 ; RV64I-NEXT: PseudoRET implicit $x10
517 %0:gprb(s64) = COPY $x10
518 %1:gprb(s64) = COPY $x11
519 %2:gprb(s64) = G_ASHR %0, %1
521 PseudoRET implicit $x10
527 regBankSelected: true
528 tracksRegLiveness: true
533 ; RV64I-LABEL: name: srai_i64
534 ; RV64I: liveins: $x10
536 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
537 ; RV64I-NEXT: [[SRAI:%[0-9]+]]:gpr = SRAI [[COPY]], 63
538 ; RV64I-NEXT: $x10 = COPY [[SRAI]]
539 ; RV64I-NEXT: PseudoRET implicit $x10
540 %0:gprb(s64) = COPY $x10
541 %1:gprb(s64) = G_CONSTANT i64 63
542 %2:gprb(s64) = G_ASHR %0, %1
544 PseudoRET implicit $x10
550 regBankSelected: true
551 tracksRegLiveness: true
556 ; RV64I-LABEL: name: lshr_i64
557 ; RV64I: liveins: $x10, $x11
559 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
560 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
561 ; RV64I-NEXT: [[SRL:%[0-9]+]]:gpr = SRL [[COPY]], [[COPY1]]
562 ; RV64I-NEXT: $x10 = COPY [[SRL]]
563 ; RV64I-NEXT: PseudoRET implicit $x10
564 %0:gprb(s64) = COPY $x10
565 %1:gprb(s64) = COPY $x11
566 %2:gprb(s64) = G_LSHR %0, %1
568 PseudoRET implicit $x10
574 regBankSelected: true
575 tracksRegLiveness: true
580 ; RV64I-LABEL: name: srli_i64
581 ; RV64I: liveins: $x10
583 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
584 ; RV64I-NEXT: [[SRLI:%[0-9]+]]:gpr = SRLI [[COPY]], 63
585 ; RV64I-NEXT: $x10 = COPY [[SRLI]]
586 ; RV64I-NEXT: PseudoRET implicit $x10
587 %0:gprb(s64) = COPY $x10
588 %1:gprb(s64) = G_CONSTANT i64 63
589 %2:gprb(s64) = G_LSHR %0, %1
591 PseudoRET implicit $x10
597 regBankSelected: true
598 tracksRegLiveness: true
603 ; RV64I-LABEL: name: and_i64
604 ; RV64I: liveins: $x10, $x11
606 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
607 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
608 ; RV64I-NEXT: [[AND:%[0-9]+]]:gpr = AND [[COPY]], [[COPY1]]
609 ; RV64I-NEXT: $x10 = COPY [[AND]]
610 ; RV64I-NEXT: PseudoRET implicit $x10
611 %0:gprb(s64) = COPY $x10
612 %1:gprb(s64) = COPY $x11
613 %2:gprb(s64) = G_AND %0, %1
615 PseudoRET implicit $x10
621 regBankSelected: true
622 tracksRegLiveness: true
627 ; RV64I-LABEL: name: andi_i64
628 ; RV64I: liveins: $x10
630 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
631 ; RV64I-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[COPY]], 1234
632 ; RV64I-NEXT: $x10 = COPY [[ANDI]]
633 ; RV64I-NEXT: PseudoRET implicit $x10
634 %0:gprb(s64) = COPY $x10
635 %1:gprb(s64) = G_CONSTANT i64 1234
636 %2:gprb(s64) = G_AND %0, %1
638 PseudoRET implicit $x10
644 regBankSelected: true
645 tracksRegLiveness: true
650 ; RV64I-LABEL: name: or_i64
651 ; RV64I: liveins: $x10, $x11
653 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
654 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
655 ; RV64I-NEXT: [[OR:%[0-9]+]]:gpr = OR [[COPY]], [[COPY1]]
656 ; RV64I-NEXT: $x10 = COPY [[OR]]
657 ; RV64I-NEXT: PseudoRET implicit $x10
658 %0:gprb(s64) = COPY $x10
659 %1:gprb(s64) = COPY $x11
660 %2:gprb(s64) = G_OR %0, %1
662 PseudoRET implicit $x10
668 regBankSelected: true
669 tracksRegLiveness: true
674 ; RV64I-LABEL: name: ori_i64
675 ; RV64I: liveins: $x10
677 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
678 ; RV64I-NEXT: [[ORI:%[0-9]+]]:gpr = ORI [[COPY]], 1234
679 ; RV64I-NEXT: $x10 = COPY [[ORI]]
680 ; RV64I-NEXT: PseudoRET implicit $x10
681 %0:gprb(s64) = COPY $x10
682 %1:gprb(s64) = G_CONSTANT i64 1234
683 %2:gprb(s64) = G_OR %0, %1
685 PseudoRET implicit $x10
691 regBankSelected: true
692 tracksRegLiveness: true
697 ; RV64I-LABEL: name: xor_i64
698 ; RV64I: liveins: $x10, $x11
700 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
701 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
702 ; RV64I-NEXT: [[XOR:%[0-9]+]]:gpr = XOR [[COPY]], [[COPY1]]
703 ; RV64I-NEXT: $x10 = COPY [[XOR]]
704 ; RV64I-NEXT: PseudoRET implicit $x10
705 %0:gprb(s64) = COPY $x10
706 %1:gprb(s64) = COPY $x11
707 %2:gprb(s64) = G_XOR %0, %1
709 PseudoRET implicit $x10
715 regBankSelected: true
716 tracksRegLiveness: true
721 ; RV64I-LABEL: name: xori_i64
722 ; RV64I: liveins: $x10
724 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
725 ; RV64I-NEXT: [[XORI:%[0-9]+]]:gpr = XORI [[COPY]], 1234
726 ; RV64I-NEXT: $x10 = COPY [[XORI]]
727 ; RV64I-NEXT: PseudoRET implicit $x10
728 %0:gprb(s64) = COPY $x10
729 %1:gprb(s64) = G_CONSTANT i64 1234
730 %2:gprb(s64) = G_XOR %0, %1
732 PseudoRET implicit $x10
738 regBankSelected: true
739 tracksRegLiveness: true
742 liveins: $x10, $x11, $x12, $x13
744 ; RV64I-LABEL: name: add_i128
745 ; RV64I: liveins: $x10, $x11, $x12, $x13
747 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
748 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
749 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x12
750 ; RV64I-NEXT: [[COPY3:%[0-9]+]]:gpr = COPY $x13
751 ; RV64I-NEXT: [[ADD:%[0-9]+]]:gpr = ADD [[COPY]], [[COPY2]]
752 ; RV64I-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[ADD]], [[COPY2]]
753 ; RV64I-NEXT: [[ADD1:%[0-9]+]]:gpr = ADD [[COPY1]], [[COPY3]]
754 ; RV64I-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[SLTU]], 1
755 ; RV64I-NEXT: [[ADD2:%[0-9]+]]:gpr = ADD [[ADD1]], [[ANDI]]
756 ; RV64I-NEXT: $x10 = COPY [[ADD]]
757 ; RV64I-NEXT: $x11 = COPY [[ADD2]]
758 ; RV64I-NEXT: PseudoRET implicit $x10, implicit $x11
759 %0:gprb(s64) = COPY $x10
760 %1:gprb(s64) = COPY $x11
761 %2:gprb(s64) = COPY $x12
762 %3:gprb(s64) = COPY $x13
763 %4:gprb(s64) = G_ADD %0, %2
764 %5:gprb(s64) = G_ICMP intpred(ult), %4(s64), %2
765 %6:gprb(s64) = G_ADD %1, %3
766 %7:gprb(s64) = G_CONSTANT i64 1
767 %8:gprb(s64) = G_AND %5, %7
768 %9:gprb(s64) = G_ADD %6, %8
771 PseudoRET implicit $x10, implicit $x11
777 regBankSelected: true
778 tracksRegLiveness: true
781 liveins: $x10, $x11, $x12, $x13
783 ; RV64I-LABEL: name: sub_i128
784 ; RV64I: liveins: $x10, $x11, $x12, $x13
786 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
787 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
788 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x12
789 ; RV64I-NEXT: [[COPY3:%[0-9]+]]:gpr = COPY $x13
790 ; RV64I-NEXT: [[SUB:%[0-9]+]]:gpr = SUB [[COPY]], [[COPY2]]
791 ; RV64I-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU [[COPY]], [[COPY2]]
792 ; RV64I-NEXT: [[SUB1:%[0-9]+]]:gpr = SUB [[COPY1]], [[COPY3]]
793 ; RV64I-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[SLTU]], 1
794 ; RV64I-NEXT: [[SUB2:%[0-9]+]]:gpr = SUB [[SUB1]], [[ANDI]]
795 ; RV64I-NEXT: $x10 = COPY [[SUB]]
796 ; RV64I-NEXT: $x11 = COPY [[SUB2]]
797 ; RV64I-NEXT: PseudoRET implicit $x10, implicit $x11
798 %0:gprb(s64) = COPY $x10
799 %1:gprb(s64) = COPY $x11
800 %2:gprb(s64) = COPY $x12
801 %3:gprb(s64) = COPY $x13
802 %4:gprb(s64) = G_SUB %0, %2
803 %5:gprb(s64) = G_ICMP intpred(ult), %0(s64), %2
804 %6:gprb(s64) = G_SUB %1, %3
805 %7:gprb(s64) = G_CONSTANT i64 1
806 %8:gprb(s64) = G_AND %5, %7
807 %9:gprb(s64) = G_SUB %6, %8
810 PseudoRET implicit $x10, implicit $x11