1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -mattr=+m -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefix=RV64IM
5 ; The patterns for the 'W' suffixed RV64M instructions have the potential of
6 ; missing cases. This file checks all the variants of
7 ; sign-extended/zero-extended/any-extended inputs and outputs.
9 define i32 @aext_mulw_aext_aext(i32 %a, i32 %b) nounwind {
10 ; RV64IM-LABEL: aext_mulw_aext_aext:
12 ; RV64IM-NEXT: mulw a0, a0, a1
18 define i32 @aext_mulw_aext_sext(i32 %a, i32 signext %b) nounwind {
19 ; RV64IM-LABEL: aext_mulw_aext_sext:
21 ; RV64IM-NEXT: mulw a0, a0, a1
27 define i32 @aext_mulw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
28 ; RV64IM-LABEL: aext_mulw_aext_zext:
30 ; RV64IM-NEXT: mulw a0, a0, a1
36 define i32 @aext_mulw_sext_aext(i32 signext %a, i32 %b) nounwind {
37 ; RV64IM-LABEL: aext_mulw_sext_aext:
39 ; RV64IM-NEXT: mulw a0, a0, a1
45 define i32 @aext_mulw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
46 ; RV64IM-LABEL: aext_mulw_sext_sext:
48 ; RV64IM-NEXT: mulw a0, a0, a1
54 define i32 @aext_mulw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
55 ; RV64IM-LABEL: aext_mulw_sext_zext:
57 ; RV64IM-NEXT: mulw a0, a0, a1
63 define i32 @aext_mulw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
64 ; RV64IM-LABEL: aext_mulw_zext_aext:
66 ; RV64IM-NEXT: mulw a0, a0, a1
72 define i32 @aext_mulw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
73 ; RV64IM-LABEL: aext_mulw_zext_sext:
75 ; RV64IM-NEXT: mulw a0, a0, a1
81 define i32 @aext_mulw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
82 ; RV64IM-LABEL: aext_mulw_zext_zext:
84 ; RV64IM-NEXT: mulw a0, a0, a1
90 define signext i32 @sext_mulw_aext_aext(i32 %a, i32 %b) nounwind {
91 ; RV64IM-LABEL: sext_mulw_aext_aext:
93 ; RV64IM-NEXT: mulw a0, a0, a1
99 define signext i32 @sext_mulw_aext_sext(i32 %a, i32 signext %b) nounwind {
100 ; RV64IM-LABEL: sext_mulw_aext_sext:
102 ; RV64IM-NEXT: mulw a0, a0, a1
108 define signext i32 @sext_mulw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
109 ; RV64IM-LABEL: sext_mulw_aext_zext:
111 ; RV64IM-NEXT: mulw a0, a0, a1
117 define signext i32 @sext_mulw_sext_aext(i32 signext %a, i32 %b) nounwind {
118 ; RV64IM-LABEL: sext_mulw_sext_aext:
120 ; RV64IM-NEXT: mulw a0, a0, a1
126 define signext i32 @sext_mulw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
127 ; RV64IM-LABEL: sext_mulw_sext_sext:
129 ; RV64IM-NEXT: mulw a0, a0, a1
135 define signext i32 @sext_mulw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
136 ; RV64IM-LABEL: sext_mulw_sext_zext:
138 ; RV64IM-NEXT: mulw a0, a0, a1
144 define signext i32 @sext_mulw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
145 ; RV64IM-LABEL: sext_mulw_zext_aext:
147 ; RV64IM-NEXT: mulw a0, a0, a1
153 define signext i32 @sext_mulw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
154 ; RV64IM-LABEL: sext_mulw_zext_sext:
156 ; RV64IM-NEXT: mulw a0, a0, a1
162 define signext i32 @sext_mulw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
163 ; RV64IM-LABEL: sext_mulw_zext_zext:
165 ; RV64IM-NEXT: mulw a0, a0, a1
171 define zeroext i32 @zext_mulw_aext_aext(i32 %a, i32 %b) nounwind {
172 ; RV64IM-LABEL: zext_mulw_aext_aext:
174 ; RV64IM-NEXT: mul a0, a0, a1
175 ; RV64IM-NEXT: slli a0, a0, 32
176 ; RV64IM-NEXT: srli a0, a0, 32
182 define zeroext i32 @zext_mulw_aext_sext(i32 %a, i32 signext %b) nounwind {
183 ; RV64IM-LABEL: zext_mulw_aext_sext:
185 ; RV64IM-NEXT: mul a0, a0, a1
186 ; RV64IM-NEXT: slli a0, a0, 32
187 ; RV64IM-NEXT: srli a0, a0, 32
193 define zeroext i32 @zext_mulw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
194 ; RV64IM-LABEL: zext_mulw_aext_zext:
196 ; RV64IM-NEXT: mul a0, a0, a1
197 ; RV64IM-NEXT: slli a0, a0, 32
198 ; RV64IM-NEXT: srli a0, a0, 32
204 define zeroext i32 @zext_mulw_sext_aext(i32 signext %a, i32 %b) nounwind {
205 ; RV64IM-LABEL: zext_mulw_sext_aext:
207 ; RV64IM-NEXT: mul a0, a0, a1
208 ; RV64IM-NEXT: slli a0, a0, 32
209 ; RV64IM-NEXT: srli a0, a0, 32
215 define zeroext i32 @zext_mulw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
216 ; RV64IM-LABEL: zext_mulw_sext_sext:
218 ; RV64IM-NEXT: mul a0, a0, a1
219 ; RV64IM-NEXT: slli a0, a0, 32
220 ; RV64IM-NEXT: srli a0, a0, 32
226 define zeroext i32 @zext_mulw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
227 ; RV64IM-LABEL: zext_mulw_sext_zext:
229 ; RV64IM-NEXT: mul a0, a0, a1
230 ; RV64IM-NEXT: slli a0, a0, 32
231 ; RV64IM-NEXT: srli a0, a0, 32
237 define zeroext i32 @zext_mulw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
238 ; RV64IM-LABEL: zext_mulw_zext_aext:
240 ; RV64IM-NEXT: mul a0, a0, a1
241 ; RV64IM-NEXT: slli a0, a0, 32
242 ; RV64IM-NEXT: srli a0, a0, 32
248 define zeroext i32 @zext_mulw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
249 ; RV64IM-LABEL: zext_mulw_zext_sext:
251 ; RV64IM-NEXT: mul a0, a0, a1
252 ; RV64IM-NEXT: slli a0, a0, 32
253 ; RV64IM-NEXT: srli a0, a0, 32
259 define zeroext i32 @zext_mulw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
260 ; RV64IM-LABEL: zext_mulw_zext_zext:
262 ; RV64IM-NEXT: mul a0, a0, a1
263 ; RV64IM-NEXT: slli a0, a0, 32
264 ; RV64IM-NEXT: srli a0, a0, 32
270 define i32 @aext_divuw_aext_aext(i32 %a, i32 %b) nounwind {
271 ; RV64IM-LABEL: aext_divuw_aext_aext:
273 ; RV64IM-NEXT: divuw a0, a0, a1
279 define i32 @aext_divuw_aext_sext(i32 %a, i32 signext %b) nounwind {
280 ; RV64IM-LABEL: aext_divuw_aext_sext:
282 ; RV64IM-NEXT: divuw a0, a0, a1
288 define i32 @aext_divuw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
289 ; RV64IM-LABEL: aext_divuw_aext_zext:
291 ; RV64IM-NEXT: divuw a0, a0, a1
297 define i32 @aext_divuw_sext_aext(i32 signext %a, i32 %b) nounwind {
298 ; RV64IM-LABEL: aext_divuw_sext_aext:
300 ; RV64IM-NEXT: divuw a0, a0, a1
306 define i32 @aext_divuw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
307 ; RV64IM-LABEL: aext_divuw_sext_sext:
309 ; RV64IM-NEXT: divuw a0, a0, a1
315 define i32 @aext_divuw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
316 ; RV64IM-LABEL: aext_divuw_sext_zext:
318 ; RV64IM-NEXT: divuw a0, a0, a1
324 define i32 @aext_divuw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
325 ; RV64IM-LABEL: aext_divuw_zext_aext:
327 ; RV64IM-NEXT: divuw a0, a0, a1
333 define i32 @aext_divuw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
334 ; RV64IM-LABEL: aext_divuw_zext_sext:
336 ; RV64IM-NEXT: divuw a0, a0, a1
342 define i32 @aext_divuw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
343 ; RV64IM-LABEL: aext_divuw_zext_zext:
345 ; RV64IM-NEXT: divuw a0, a0, a1
351 define signext i32 @sext_divuw_aext_aext(i32 %a, i32 %b) nounwind {
352 ; RV64IM-LABEL: sext_divuw_aext_aext:
354 ; RV64IM-NEXT: divuw a0, a0, a1
360 define signext i32 @sext_divuw_aext_sext(i32 %a, i32 signext %b) nounwind {
361 ; RV64IM-LABEL: sext_divuw_aext_sext:
363 ; RV64IM-NEXT: divuw a0, a0, a1
369 define signext i32 @sext_divuw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
370 ; RV64IM-LABEL: sext_divuw_aext_zext:
372 ; RV64IM-NEXT: divuw a0, a0, a1
378 define signext i32 @sext_divuw_sext_aext(i32 signext %a, i32 %b) nounwind {
379 ; RV64IM-LABEL: sext_divuw_sext_aext:
381 ; RV64IM-NEXT: divuw a0, a0, a1
387 define signext i32 @sext_divuw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
388 ; RV64IM-LABEL: sext_divuw_sext_sext:
390 ; RV64IM-NEXT: divuw a0, a0, a1
396 define signext i32 @sext_divuw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
397 ; RV64IM-LABEL: sext_divuw_sext_zext:
399 ; RV64IM-NEXT: divuw a0, a0, a1
405 define signext i32 @sext_divuw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
406 ; RV64IM-LABEL: sext_divuw_zext_aext:
408 ; RV64IM-NEXT: divuw a0, a0, a1
414 define signext i32 @sext_divuw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
415 ; RV64IM-LABEL: sext_divuw_zext_sext:
417 ; RV64IM-NEXT: divuw a0, a0, a1
423 define signext i32 @sext_divuw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
424 ; RV64IM-LABEL: sext_divuw_zext_zext:
426 ; RV64IM-NEXT: divuw a0, a0, a1
432 define zeroext i32 @zext_divuw_aext_aext(i32 %a, i32 %b) nounwind {
433 ; RV64IM-LABEL: zext_divuw_aext_aext:
435 ; RV64IM-NEXT: divuw a0, a0, a1
436 ; RV64IM-NEXT: slli a0, a0, 32
437 ; RV64IM-NEXT: srli a0, a0, 32
443 define zeroext i32 @zext_divuw_aext_sext(i32 %a, i32 signext %b) nounwind {
444 ; RV64IM-LABEL: zext_divuw_aext_sext:
446 ; RV64IM-NEXT: divuw a0, a0, a1
447 ; RV64IM-NEXT: slli a0, a0, 32
448 ; RV64IM-NEXT: srli a0, a0, 32
454 define zeroext i32 @zext_divuw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
455 ; RV64IM-LABEL: zext_divuw_aext_zext:
457 ; RV64IM-NEXT: divuw a0, a0, a1
458 ; RV64IM-NEXT: slli a0, a0, 32
459 ; RV64IM-NEXT: srli a0, a0, 32
465 define zeroext i32 @zext_divuw_sext_aext(i32 signext %a, i32 %b) nounwind {
466 ; RV64IM-LABEL: zext_divuw_sext_aext:
468 ; RV64IM-NEXT: divuw a0, a0, a1
469 ; RV64IM-NEXT: slli a0, a0, 32
470 ; RV64IM-NEXT: srli a0, a0, 32
476 define zeroext i32 @zext_divuw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
477 ; RV64IM-LABEL: zext_divuw_sext_sext:
479 ; RV64IM-NEXT: divuw a0, a0, a1
480 ; RV64IM-NEXT: slli a0, a0, 32
481 ; RV64IM-NEXT: srli a0, a0, 32
487 define zeroext i32 @zext_divuw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
488 ; RV64IM-LABEL: zext_divuw_sext_zext:
490 ; RV64IM-NEXT: divuw a0, a0, a1
491 ; RV64IM-NEXT: slli a0, a0, 32
492 ; RV64IM-NEXT: srli a0, a0, 32
498 define zeroext i32 @zext_divuw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
499 ; RV64IM-LABEL: zext_divuw_zext_aext:
501 ; RV64IM-NEXT: divuw a0, a0, a1
502 ; RV64IM-NEXT: slli a0, a0, 32
503 ; RV64IM-NEXT: srli a0, a0, 32
509 define zeroext i32 @zext_divuw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
510 ; RV64IM-LABEL: zext_divuw_zext_sext:
512 ; RV64IM-NEXT: divuw a0, a0, a1
513 ; RV64IM-NEXT: slli a0, a0, 32
514 ; RV64IM-NEXT: srli a0, a0, 32
520 define zeroext i32 @zext_divuw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
521 ; RV64IM-LABEL: zext_divuw_zext_zext:
523 ; RV64IM-NEXT: divu a0, a0, a1
529 define i32 @aext_divw_aext_aext(i32 %a, i32 %b) nounwind {
530 ; RV64IM-LABEL: aext_divw_aext_aext:
532 ; RV64IM-NEXT: divw a0, a0, a1
538 define i32 @aext_divw_aext_sext(i32 %a, i32 signext %b) nounwind {
539 ; RV64IM-LABEL: aext_divw_aext_sext:
541 ; RV64IM-NEXT: divw a0, a0, a1
547 define i32 @aext_divw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
548 ; RV64IM-LABEL: aext_divw_aext_zext:
550 ; RV64IM-NEXT: divw a0, a0, a1
556 define i32 @aext_divw_sext_aext(i32 signext %a, i32 %b) nounwind {
557 ; RV64IM-LABEL: aext_divw_sext_aext:
559 ; RV64IM-NEXT: divw a0, a0, a1
565 define i32 @aext_divw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
566 ; RV64IM-LABEL: aext_divw_sext_sext:
568 ; RV64IM-NEXT: divw a0, a0, a1
574 define i32 @aext_divw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
575 ; RV64IM-LABEL: aext_divw_sext_zext:
577 ; RV64IM-NEXT: divw a0, a0, a1
583 define i32 @aext_divw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
584 ; RV64IM-LABEL: aext_divw_zext_aext:
586 ; RV64IM-NEXT: divw a0, a0, a1
592 define i32 @aext_divw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
593 ; RV64IM-LABEL: aext_divw_zext_sext:
595 ; RV64IM-NEXT: divw a0, a0, a1
601 define i32 @aext_divw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
602 ; RV64IM-LABEL: aext_divw_zext_zext:
604 ; RV64IM-NEXT: divw a0, a0, a1
610 define signext i32 @sext_divw_aext_aext(i32 %a, i32 %b) nounwind {
611 ; RV64IM-LABEL: sext_divw_aext_aext:
613 ; RV64IM-NEXT: divw a0, a0, a1
619 define signext i32 @sext_divw_aext_sext(i32 %a, i32 signext %b) nounwind {
620 ; RV64IM-LABEL: sext_divw_aext_sext:
622 ; RV64IM-NEXT: divw a0, a0, a1
628 define signext i32 @sext_divw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
629 ; RV64IM-LABEL: sext_divw_aext_zext:
631 ; RV64IM-NEXT: divw a0, a0, a1
637 define signext i32 @sext_divw_sext_aext(i32 signext %a, i32 %b) nounwind {
638 ; RV64IM-LABEL: sext_divw_sext_aext:
640 ; RV64IM-NEXT: divw a0, a0, a1
646 define signext i32 @sext_divw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
647 ; RV64IM-LABEL: sext_divw_sext_sext:
649 ; RV64IM-NEXT: divw a0, a0, a1
655 define signext i32 @sext_divw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
656 ; RV64IM-LABEL: sext_divw_sext_zext:
658 ; RV64IM-NEXT: divw a0, a0, a1
664 define signext i32 @sext_divw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
665 ; RV64IM-LABEL: sext_divw_zext_aext:
667 ; RV64IM-NEXT: divw a0, a0, a1
673 define signext i32 @sext_divw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
674 ; RV64IM-LABEL: sext_divw_zext_sext:
676 ; RV64IM-NEXT: divw a0, a0, a1
682 define signext i32 @sext_divw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
683 ; RV64IM-LABEL: sext_divw_zext_zext:
685 ; RV64IM-NEXT: divw a0, a0, a1
691 define zeroext i32 @zext_divw_aext_aext(i32 %a, i32 %b) nounwind {
692 ; RV64IM-LABEL: zext_divw_aext_aext:
694 ; RV64IM-NEXT: divw a0, a0, a1
695 ; RV64IM-NEXT: slli a0, a0, 32
696 ; RV64IM-NEXT: srli a0, a0, 32
702 define zeroext i32 @zext_divw_aext_sext(i32 %a, i32 signext %b) nounwind {
703 ; RV64IM-LABEL: zext_divw_aext_sext:
705 ; RV64IM-NEXT: divw a0, a0, a1
706 ; RV64IM-NEXT: slli a0, a0, 32
707 ; RV64IM-NEXT: srli a0, a0, 32
713 define zeroext i32 @zext_divw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
714 ; RV64IM-LABEL: zext_divw_aext_zext:
716 ; RV64IM-NEXT: divw a0, a0, a1
717 ; RV64IM-NEXT: slli a0, a0, 32
718 ; RV64IM-NEXT: srli a0, a0, 32
724 define zeroext i32 @zext_divw_sext_aext(i32 signext %a, i32 %b) nounwind {
725 ; RV64IM-LABEL: zext_divw_sext_aext:
727 ; RV64IM-NEXT: divw a0, a0, a1
728 ; RV64IM-NEXT: slli a0, a0, 32
729 ; RV64IM-NEXT: srli a0, a0, 32
735 define zeroext i32 @zext_divw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
736 ; RV64IM-LABEL: zext_divw_sext_sext:
738 ; RV64IM-NEXT: divw a0, a0, a1
739 ; RV64IM-NEXT: slli a0, a0, 32
740 ; RV64IM-NEXT: srli a0, a0, 32
746 define zeroext i32 @zext_divw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
747 ; RV64IM-LABEL: zext_divw_sext_zext:
749 ; RV64IM-NEXT: divw a0, a0, a1
750 ; RV64IM-NEXT: slli a0, a0, 32
751 ; RV64IM-NEXT: srli a0, a0, 32
757 define zeroext i32 @zext_divw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
758 ; RV64IM-LABEL: zext_divw_zext_aext:
760 ; RV64IM-NEXT: divw a0, a0, a1
761 ; RV64IM-NEXT: slli a0, a0, 32
762 ; RV64IM-NEXT: srli a0, a0, 32
768 define zeroext i32 @zext_divw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
769 ; RV64IM-LABEL: zext_divw_zext_sext:
771 ; RV64IM-NEXT: divw a0, a0, a1
772 ; RV64IM-NEXT: slli a0, a0, 32
773 ; RV64IM-NEXT: srli a0, a0, 32
779 define zeroext i32 @zext_divw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
780 ; RV64IM-LABEL: zext_divw_zext_zext:
782 ; RV64IM-NEXT: divw a0, a0, a1
783 ; RV64IM-NEXT: slli a0, a0, 32
784 ; RV64IM-NEXT: srli a0, a0, 32
790 define i32 @aext_remw_aext_aext(i32 %a, i32 %b) nounwind {
791 ; RV64IM-LABEL: aext_remw_aext_aext:
793 ; RV64IM-NEXT: remw a0, a0, a1
799 define i32 @aext_remw_aext_sext(i32 %a, i32 signext %b) nounwind {
800 ; RV64IM-LABEL: aext_remw_aext_sext:
802 ; RV64IM-NEXT: remw a0, a0, a1
808 define i32 @aext_remw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
809 ; RV64IM-LABEL: aext_remw_aext_zext:
811 ; RV64IM-NEXT: remw a0, a0, a1
817 define i32 @aext_remw_sext_aext(i32 signext %a, i32 %b) nounwind {
818 ; RV64IM-LABEL: aext_remw_sext_aext:
820 ; RV64IM-NEXT: remw a0, a0, a1
826 define i32 @aext_remw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
827 ; RV64IM-LABEL: aext_remw_sext_sext:
829 ; RV64IM-NEXT: remw a0, a0, a1
835 define i32 @aext_remw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
836 ; RV64IM-LABEL: aext_remw_sext_zext:
838 ; RV64IM-NEXT: remw a0, a0, a1
844 define i32 @aext_remw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
845 ; RV64IM-LABEL: aext_remw_zext_aext:
847 ; RV64IM-NEXT: remw a0, a0, a1
853 define i32 @aext_remw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
854 ; RV64IM-LABEL: aext_remw_zext_sext:
856 ; RV64IM-NEXT: remw a0, a0, a1
862 define i32 @aext_remw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
863 ; RV64IM-LABEL: aext_remw_zext_zext:
865 ; RV64IM-NEXT: remw a0, a0, a1
871 define signext i32 @sext_remw_aext_aext(i32 %a, i32 %b) nounwind {
872 ; RV64IM-LABEL: sext_remw_aext_aext:
874 ; RV64IM-NEXT: remw a0, a0, a1
880 define signext i32 @sext_remw_aext_sext(i32 %a, i32 signext %b) nounwind {
881 ; RV64IM-LABEL: sext_remw_aext_sext:
883 ; RV64IM-NEXT: remw a0, a0, a1
889 define signext i32 @sext_remw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
890 ; RV64IM-LABEL: sext_remw_aext_zext:
892 ; RV64IM-NEXT: remw a0, a0, a1
898 define signext i32 @sext_remw_sext_aext(i32 signext %a, i32 %b) nounwind {
899 ; RV64IM-LABEL: sext_remw_sext_aext:
901 ; RV64IM-NEXT: remw a0, a0, a1
907 define signext i32 @sext_remw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
908 ; RV64IM-LABEL: sext_remw_sext_sext:
910 ; RV64IM-NEXT: remw a0, a0, a1
916 define signext i32 @sext_remw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
917 ; RV64IM-LABEL: sext_remw_sext_zext:
919 ; RV64IM-NEXT: remw a0, a0, a1
925 define signext i32 @sext_remw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
926 ; RV64IM-LABEL: sext_remw_zext_aext:
928 ; RV64IM-NEXT: remw a0, a0, a1
934 define signext i32 @sext_remw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
935 ; RV64IM-LABEL: sext_remw_zext_sext:
937 ; RV64IM-NEXT: remw a0, a0, a1
943 define signext i32 @sext_remw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
944 ; RV64IM-LABEL: sext_remw_zext_zext:
946 ; RV64IM-NEXT: remw a0, a0, a1
952 define zeroext i32 @zext_remw_aext_aext(i32 %a, i32 %b) nounwind {
953 ; RV64IM-LABEL: zext_remw_aext_aext:
955 ; RV64IM-NEXT: remw a0, a0, a1
956 ; RV64IM-NEXT: slli a0, a0, 32
957 ; RV64IM-NEXT: srli a0, a0, 32
963 define zeroext i32 @zext_remw_aext_sext(i32 %a, i32 signext %b) nounwind {
964 ; RV64IM-LABEL: zext_remw_aext_sext:
966 ; RV64IM-NEXT: remw a0, a0, a1
967 ; RV64IM-NEXT: slli a0, a0, 32
968 ; RV64IM-NEXT: srli a0, a0, 32
974 define zeroext i32 @zext_remw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
975 ; RV64IM-LABEL: zext_remw_aext_zext:
977 ; RV64IM-NEXT: remw a0, a0, a1
978 ; RV64IM-NEXT: slli a0, a0, 32
979 ; RV64IM-NEXT: srli a0, a0, 32
985 define zeroext i32 @zext_remw_sext_aext(i32 signext %a, i32 %b) nounwind {
986 ; RV64IM-LABEL: zext_remw_sext_aext:
988 ; RV64IM-NEXT: remw a0, a0, a1
989 ; RV64IM-NEXT: slli a0, a0, 32
990 ; RV64IM-NEXT: srli a0, a0, 32
996 define zeroext i32 @zext_remw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
997 ; RV64IM-LABEL: zext_remw_sext_sext:
999 ; RV64IM-NEXT: remw a0, a0, a1
1000 ; RV64IM-NEXT: slli a0, a0, 32
1001 ; RV64IM-NEXT: srli a0, a0, 32
1003 %1 = srem i32 %a, %b
1007 define zeroext i32 @zext_remw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
1008 ; RV64IM-LABEL: zext_remw_sext_zext:
1010 ; RV64IM-NEXT: remw a0, a0, a1
1011 ; RV64IM-NEXT: slli a0, a0, 32
1012 ; RV64IM-NEXT: srli a0, a0, 32
1014 %1 = srem i32 %a, %b
1018 define zeroext i32 @zext_remw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
1019 ; RV64IM-LABEL: zext_remw_zext_aext:
1021 ; RV64IM-NEXT: remw a0, a0, a1
1022 ; RV64IM-NEXT: slli a0, a0, 32
1023 ; RV64IM-NEXT: srli a0, a0, 32
1025 %1 = srem i32 %a, %b
1029 define zeroext i32 @zext_remw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
1030 ; RV64IM-LABEL: zext_remw_zext_sext:
1032 ; RV64IM-NEXT: remw a0, a0, a1
1033 ; RV64IM-NEXT: slli a0, a0, 32
1034 ; RV64IM-NEXT: srli a0, a0, 32
1036 %1 = srem i32 %a, %b
1040 define zeroext i32 @zext_remw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
1041 ; RV64IM-LABEL: zext_remw_zext_zext:
1043 ; RV64IM-NEXT: remw a0, a0, a1
1044 ; RV64IM-NEXT: slli a0, a0, 32
1045 ; RV64IM-NEXT: srli a0, a0, 32
1047 %1 = srem i32 %a, %b
1051 define i32 @aext_remuw_aext_aext(i32 %a, i32 %b) nounwind {
1052 ; RV64IM-LABEL: aext_remuw_aext_aext:
1054 ; RV64IM-NEXT: remuw a0, a0, a1
1056 %1 = urem i32 %a, %b
1060 define i32 @aext_remuw_aext_sext(i32 %a, i32 signext %b) nounwind {
1061 ; RV64IM-LABEL: aext_remuw_aext_sext:
1063 ; RV64IM-NEXT: remuw a0, a0, a1
1065 %1 = urem i32 %a, %b
1069 define i32 @aext_remuw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
1070 ; RV64IM-LABEL: aext_remuw_aext_zext:
1072 ; RV64IM-NEXT: remuw a0, a0, a1
1074 %1 = urem i32 %a, %b
1078 define i32 @aext_remuw_sext_aext(i32 signext %a, i32 %b) nounwind {
1079 ; RV64IM-LABEL: aext_remuw_sext_aext:
1081 ; RV64IM-NEXT: remuw a0, a0, a1
1083 %1 = urem i32 %a, %b
1087 define i32 @aext_remuw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
1088 ; RV64IM-LABEL: aext_remuw_sext_sext:
1090 ; RV64IM-NEXT: remuw a0, a0, a1
1092 %1 = urem i32 %a, %b
1096 define i32 @aext_remuw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
1097 ; RV64IM-LABEL: aext_remuw_sext_zext:
1099 ; RV64IM-NEXT: remuw a0, a0, a1
1101 %1 = urem i32 %a, %b
1105 define i32 @aext_remuw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
1106 ; RV64IM-LABEL: aext_remuw_zext_aext:
1108 ; RV64IM-NEXT: remuw a0, a0, a1
1110 %1 = urem i32 %a, %b
1114 define i32 @aext_remuw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
1115 ; RV64IM-LABEL: aext_remuw_zext_sext:
1117 ; RV64IM-NEXT: remuw a0, a0, a1
1119 %1 = urem i32 %a, %b
1123 define i32 @aext_remuw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
1124 ; RV64IM-LABEL: aext_remuw_zext_zext:
1126 ; RV64IM-NEXT: remuw a0, a0, a1
1128 %1 = urem i32 %a, %b
1132 define signext i32 @sext_remuw_aext_aext(i32 %a, i32 %b) nounwind {
1133 ; RV64IM-LABEL: sext_remuw_aext_aext:
1135 ; RV64IM-NEXT: remuw a0, a0, a1
1137 %1 = urem i32 %a, %b
1141 define signext i32 @sext_remuw_aext_sext(i32 %a, i32 signext %b) nounwind {
1142 ; RV64IM-LABEL: sext_remuw_aext_sext:
1144 ; RV64IM-NEXT: remuw a0, a0, a1
1146 %1 = urem i32 %a, %b
1150 define signext i32 @sext_remuw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
1151 ; RV64IM-LABEL: sext_remuw_aext_zext:
1153 ; RV64IM-NEXT: remuw a0, a0, a1
1155 %1 = urem i32 %a, %b
1159 define signext i32 @sext_remuw_sext_aext(i32 signext %a, i32 %b) nounwind {
1160 ; RV64IM-LABEL: sext_remuw_sext_aext:
1162 ; RV64IM-NEXT: remuw a0, a0, a1
1164 %1 = urem i32 %a, %b
1168 define signext i32 @sext_remuw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
1169 ; RV64IM-LABEL: sext_remuw_sext_sext:
1171 ; RV64IM-NEXT: remuw a0, a0, a1
1173 %1 = urem i32 %a, %b
1177 define signext i32 @sext_remuw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
1178 ; RV64IM-LABEL: sext_remuw_sext_zext:
1180 ; RV64IM-NEXT: remuw a0, a0, a1
1182 %1 = urem i32 %a, %b
1186 define signext i32 @sext_remuw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
1187 ; RV64IM-LABEL: sext_remuw_zext_aext:
1189 ; RV64IM-NEXT: remuw a0, a0, a1
1191 %1 = urem i32 %a, %b
1195 define signext i32 @sext_remuw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
1196 ; RV64IM-LABEL: sext_remuw_zext_sext:
1198 ; RV64IM-NEXT: remuw a0, a0, a1
1200 %1 = urem i32 %a, %b
1204 define signext i32 @sext_remuw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
1205 ; RV64IM-LABEL: sext_remuw_zext_zext:
1207 ; RV64IM-NEXT: remuw a0, a0, a1
1209 %1 = urem i32 %a, %b
1213 define zeroext i32 @zext_remuw_aext_aext(i32 %a, i32 %b) nounwind {
1214 ; RV64IM-LABEL: zext_remuw_aext_aext:
1216 ; RV64IM-NEXT: remuw a0, a0, a1
1217 ; RV64IM-NEXT: slli a0, a0, 32
1218 ; RV64IM-NEXT: srli a0, a0, 32
1220 %1 = urem i32 %a, %b
1224 define zeroext i32 @zext_remuw_aext_sext(i32 %a, i32 signext %b) nounwind {
1225 ; RV64IM-LABEL: zext_remuw_aext_sext:
1227 ; RV64IM-NEXT: remuw a0, a0, a1
1228 ; RV64IM-NEXT: slli a0, a0, 32
1229 ; RV64IM-NEXT: srli a0, a0, 32
1231 %1 = urem i32 %a, %b
1235 define zeroext i32 @zext_remuw_aext_zext(i32 %a, i32 zeroext %b) nounwind {
1236 ; RV64IM-LABEL: zext_remuw_aext_zext:
1238 ; RV64IM-NEXT: remuw a0, a0, a1
1239 ; RV64IM-NEXT: slli a0, a0, 32
1240 ; RV64IM-NEXT: srli a0, a0, 32
1242 %1 = urem i32 %a, %b
1246 define zeroext i32 @zext_remuw_sext_aext(i32 signext %a, i32 %b) nounwind {
1247 ; RV64IM-LABEL: zext_remuw_sext_aext:
1249 ; RV64IM-NEXT: remuw a0, a0, a1
1250 ; RV64IM-NEXT: slli a0, a0, 32
1251 ; RV64IM-NEXT: srli a0, a0, 32
1253 %1 = urem i32 %a, %b
1257 define zeroext i32 @zext_remuw_sext_sext(i32 signext %a, i32 signext %b) nounwind {
1258 ; RV64IM-LABEL: zext_remuw_sext_sext:
1260 ; RV64IM-NEXT: remuw a0, a0, a1
1261 ; RV64IM-NEXT: slli a0, a0, 32
1262 ; RV64IM-NEXT: srli a0, a0, 32
1264 %1 = urem i32 %a, %b
1268 define zeroext i32 @zext_remuw_sext_zext(i32 signext %a, i32 zeroext %b) nounwind {
1269 ; RV64IM-LABEL: zext_remuw_sext_zext:
1271 ; RV64IM-NEXT: remuw a0, a0, a1
1272 ; RV64IM-NEXT: slli a0, a0, 32
1273 ; RV64IM-NEXT: srli a0, a0, 32
1275 %1 = urem i32 %a, %b
1279 define zeroext i32 @zext_remuw_zext_aext(i32 zeroext %a, i32 %b) nounwind {
1280 ; RV64IM-LABEL: zext_remuw_zext_aext:
1282 ; RV64IM-NEXT: remuw a0, a0, a1
1283 ; RV64IM-NEXT: slli a0, a0, 32
1284 ; RV64IM-NEXT: srli a0, a0, 32
1286 %1 = urem i32 %a, %b
1290 define zeroext i32 @zext_remuw_zext_sext(i32 zeroext %a, i32 signext %b) nounwind {
1291 ; RV64IM-LABEL: zext_remuw_zext_sext:
1293 ; RV64IM-NEXT: remuw a0, a0, a1
1294 ; RV64IM-NEXT: slli a0, a0, 32
1295 ; RV64IM-NEXT: srli a0, a0, 32
1297 %1 = urem i32 %a, %b
1301 define zeroext i32 @zext_remuw_zext_zext(i32 zeroext %a, i32 zeroext %b) nounwind {
1302 ; RV64IM-LABEL: zext_remuw_zext_zext:
1304 ; RV64IM-NEXT: remu a0, a0, a1
1306 %1 = urem i32 %a, %b