Lines Matching refs:rs2

497 def : Pat<(XLenVT (and GPR:$rs1, (not GPR:$rs2))), (ANDN GPR:$rs1, GPR:$rs2)>;
498 def : Pat<(XLenVT (or GPR:$rs1, (not GPR:$rs2))), (ORN GPR:$rs1, GPR:$rs2)>;
499 def : Pat<(XLenVT (xor GPR:$rs1, (not GPR:$rs2))), (XNOR GPR:$rs1, GPR:$rs2)>;
517 def : Pat<(riscv_rolw GPR:$rs1, uimm5:$rs2),
518 (RORIW GPR:$rs1, (ImmSubFrom32 uimm5:$rs2))>;
522 def : Pat<(XLenVT (and (not (shiftop<shl> 1, (XLenVT GPR:$rs2))), GPR:$rs1)),
523 (BCLR GPR:$rs1, GPR:$rs2)>;
524 def : Pat<(XLenVT (and (rotl -2, (XLenVT GPR:$rs2)), GPR:$rs1)),
525 (BCLR GPR:$rs1, GPR:$rs2)>;
526 def : Pat<(XLenVT (or (shiftop<shl> 1, (XLenVT GPR:$rs2)), GPR:$rs1)),
527 (BSET GPR:$rs1, GPR:$rs2)>;
528 def : Pat<(XLenVT (xor (shiftop<shl> 1, (XLenVT GPR:$rs2)), GPR:$rs1)),
529 (BINV GPR:$rs1, GPR:$rs2)>;
530 def : Pat<(XLenVT (and (shiftop<srl> GPR:$rs1, (XLenVT GPR:$rs2)), 1)),
531 (BEXT GPR:$rs1, GPR:$rs2)>;
533 def : Pat<(XLenVT (shiftop<shl> 1, (XLenVT GPR:$rs2))),
534 (BSET (XLenVT X0), GPR:$rs2)>;
535 def : Pat<(XLenVT (not (shiftop<shl> -1, (XLenVT GPR:$rs2)))),
536 (ADDI (XLenVT (BSET (XLenVT X0), GPR:$rs2)), -1)>;
617 def : Pat<(or (and (shl GPR:$rs2, (XLenVT 8)), 0xFFFF),
619 (PACKH GPR:$rs1, GPR:$rs2)>;
620 def : Pat<(or (shl (zexti8 (XLenVT GPR:$rs2)), (XLenVT 8)),
622 (PACKH GPR:$rs1, GPR:$rs2)>;
623 def : Pat<(and (or (shl GPR:$rs2, (XLenVT 8)),
625 (PACKH GPR:$rs1, GPR:$rs2)>;
627 def : Pat<(binop_allhusers<or> (shl GPR:$rs2, (XLenVT 8)),
629 (PACKH GPR:$rs1, GPR:$rs2)>;
633 def : Pat<(i32 (or (zexti16 (i32 GPR:$rs1)), (shl GPR:$rs2, (i32 16)))),
634 (PACK GPR:$rs1, GPR:$rs2)>;
637 def : Pat<(i64 (or (zexti32 (i64 GPR:$rs1)), (shl GPR:$rs2, (i64 32)))),
638 (PACK GPR:$rs1, GPR:$rs2)>;
640 def : Pat<(binop_allwusers<or> (shl GPR:$rs2, (i64 16)),
642 (PACKW GPR:$rs1, GPR:$rs2)>;
643 def : Pat<(i64 (or (sext_inreg (shl GPR:$rs2, (i64 16)), i32),
645 (PACKW GPR:$rs1, GPR:$rs2)>;
662 def : Pat<(XLenVT (add_like_non_imm12 (shl GPR:$rs1, (XLenVT i)), GPR:$rs2)),
663 (shxadd GPR:$rs1, GPR:$rs2)>;
664 def : Pat<(XLenVT (riscv_shl_add GPR:$rs1, (XLenVT i), GPR:$rs2)),
665 (shxadd GPR:$rs1, GPR:$rs2)>;
669 def : Pat<(XLenVT (add_like_non_imm12 pat:$rs1, GPR:$rs2)),
670 (shxadd pat:$rs1, GPR:$rs2)>;
690 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0xFFFFFFFF), GPR:$rs2)),
691 (ADD_UW GPR:$rs1, GPR:$rs2)>;
696 def : Pat<(i64 (add_like_non_imm12 (shl (and GPR:$rs1, 0xFFFFFFFF), (i64 i)), (XLenVT GPR:$rs2))),
697 (shxadd_uw GPR:$rs1, GPR:$rs2)>;
698 def : Pat<(i64 (riscv_shl_add (and GPR:$rs1, 0xFFFFFFFF), (i64 i), GPR:$rs2)),
699 (shxadd_uw GPR:$rs1, GPR:$rs2)>;
702 def : Pat<(i64 (add_like_non_imm12 (and (shl GPR:$rs1, (i64 1)), 0x1FFFFFFFF), (XLenVT GPR:$rs2))),
703 (SH1ADD_UW GPR:$rs1, GPR:$rs2)>;
704 def : Pat<(i64 (add_like_non_imm12 (and (shl GPR:$rs1, (i64 2)), 0x3FFFFFFFF), (XLenVT GPR:$rs2))),
705 (SH2ADD_UW GPR:$rs1, GPR:$rs2)>;
706 def : Pat<(i64 (add_like_non_imm12 (and (shl GPR:$rs1, (i64 3)), 0x7FFFFFFFF), (XLenVT GPR:$rs2))),
707 (SH3ADD_UW GPR:$rs1, GPR:$rs2)>;
712 def : Pat<(i64 (add_like_non_imm12 pat:$rs1, (XLenVT GPR:$rs2))),
713 (!cast<Instruction>("SH"#i#"ADD_UW") pat:$rs1, GPR:$rs2)>;
716 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0xFFFFFFFE), (XLenVT GPR:$rs2))),
717 (SH1ADD (XLenVT (SRLIW GPR:$rs1, 1)), GPR:$rs2)>;
718 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0xFFFFFFFC), (XLenVT GPR:$rs2))),
719 (SH2ADD (XLenVT (SRLIW GPR:$rs1, 2)), GPR:$rs2)>;
720 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0xFFFFFFF8), (XLenVT GPR:$rs2))),
721 (SH3ADD (XLenVT (SRLIW GPR:$rs1, 3)), GPR:$rs2)>;
724 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0x1FFFFFFFE), (XLenVT GPR:$rs2))),
725 (SH1ADD_UW (XLenVT (SRLI GPR:$rs1, 1)), GPR:$rs2)>;
726 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0x3FFFFFFFC), (XLenVT GPR:$rs2))),
727 (SH2ADD_UW (XLenVT (SRLI GPR:$rs1, 2)), GPR:$rs2)>;
728 def : Pat<(i64 (add_like_non_imm12 (and GPR:$rs1, 0x7FFFFFFF8), (XLenVT GPR:$rs2))),
729 (SH3ADD_UW (XLenVT (SRLI GPR:$rs1, 3)), GPR:$rs2)>;
773 def : Pat<(i32 (and GPR:$rs1, (not GPR:$rs2))), (ANDN GPR:$rs1, GPR:$rs2)>;
774 def : Pat<(i32 (or GPR:$rs1, (not GPR:$rs2))), (ORN GPR:$rs1, GPR:$rs2)>;
775 def : Pat<(i32 (xor GPR:$rs1, (not GPR:$rs2))), (XNOR GPR:$rs1, GPR:$rs2)>;
781 def : Pat<(i32 (rotl GPR:$rs1, uimm5:$rs2)),
782 (RORIW GPR:$rs1, (ImmSubFrom32 uimm5:$rs2))>;
786 def : Pat<(or (and (shl GPR:$rs2, (i64 8)), 0xFFFF),
788 (PACKH GPR:$rs1, GPR:$rs2)>;
789 def : Pat<(or (shl (zexti8i32 (i32 GPR:$rs2)), (i64 8)),
791 (PACKH GPR:$rs1, GPR:$rs2)>;
792 def : Pat<(and (anyext (or (shl GPR:$rs2, (XLenVT 8)),
794 (PACKH GPR:$rs1, GPR:$rs2)>;
796 def : Pat<(i32 (or (shl GPR:$rs2, (i64 16)), (zexti16i32 (i32 GPR:$rs1)))),
797 (PACKW GPR:$rs1, GPR:$rs2)>;
804 def : Pat<(i64 (add_like_non_imm12 (zext GPR:$rs1), GPR:$rs2)),
805 (ADD_UW GPR:$rs1, GPR:$rs2)>;
810 def : Pat<(i32 (add_like_non_imm12 (shl GPR:$rs1, (i64 i)), GPR:$rs2)),
811 (shxadd GPR:$rs1, GPR:$rs2)>;
812 def : Pat<(i32 (riscv_shl_add GPR:$rs1, (i32 i), GPR:$rs2)),
813 (shxadd GPR:$rs1, GPR:$rs2)>;
818 def : Pat<(i32 (and (not (shiftop<shl> 1, (i64 GPR:$rs2))), GPR:$rs1)),
819 (BCLR GPR:$rs1, GPR:$rs2)>;
820 def : Pat<(i32 (and (rotl -2, (i64 GPR:$rs2)), GPR:$rs1)),
821 (BCLR GPR:$rs1, GPR:$rs2)>;
822 def : Pat<(i32 (or (shiftop<shl> 1, (i64 GPR:$rs2)), GPR:$rs1)),
823 (BSET GPR:$rs1, GPR:$rs2)>;
824 def : Pat<(i32 (xor (shiftop<shl> 1, (i64 GPR:$rs2)), GPR:$rs1)),
825 (BINV GPR:$rs1, GPR:$rs2)>;
826 def : Pat<(i32 (and (shiftop<srl> GPR:$rs1, (i64 GPR:$rs2)), 1)),
827 (BEXT GPR:$rs1, GPR:$rs2)>;
828 def : Pat<(i64 (and (anyext (i32 (shiftop<srl> GPR:$rs1, (i64 GPR:$rs2)))), 1)),
829 (BEXT GPR:$rs1, GPR:$rs2)>;
831 def : Pat<(i32 (shiftop<shl> 1, (i64 GPR:$rs2))),
832 (BSET (XLenVT X0), GPR:$rs2)>;
833 def : Pat<(i32 (not (shiftop<shl> -1, (i64 GPR:$rs2)))),
834 (ADDI (i32 (BSET (XLenVT X0), GPR:$rs2)), -1)>;