Lines Matching refs:XLenVT
54 def shfl_uimm : RISCVOp, ImmLeaf<XLenVT, [{
85 def BCLRMask : ImmLeaf<XLenVT, [{
92 def SingleBitSetMask : ImmLeaf<XLenVT, [{
230 def Shifted32OnesMask : IntImmLeaf<XLenVT, [{
239 def sh1add_op : ComplexPattern<XLenVT, 1, "selectSHXADDOp<1>", [], [], 6>;
240 def sh2add_op : ComplexPattern<XLenVT, 1, "selectSHXADDOp<2>", [], [], 6>;
241 def sh3add_op : ComplexPattern<XLenVT, 1, "selectSHXADDOp<3>", [], [], 6>;
243 def sh1add_uw_op : ComplexPattern<XLenVT, 1, "selectSHXADD_UWOp<1>", [], [], 6>;
244 def sh2add_uw_op : ComplexPattern<XLenVT, 1, "selectSHXADD_UWOp<2>", [], [], 6>;
245 def sh3add_uw_op : ComplexPattern<XLenVT, 1, "selectSHXADD_UWOp<3>", [], [], 6>;
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)>;
509 def : Pat<(XLenVT (rotl GPR:$rs1, uimmlog2xlen:$shamt)),
522 def : Pat<(XLenVT (and (not (shiftop<shl> 1, (XLenVT GPR:$rs2))), GPR:$rs1)),
524 def : Pat<(XLenVT (and (rotl -2, (XLenVT GPR:$rs2)), GPR:$rs1)),
526 def : Pat<(XLenVT (or (shiftop<shl> 1, (XLenVT GPR:$rs2)), GPR:$rs1)),
528 def : Pat<(XLenVT (xor (shiftop<shl> 1, (XLenVT GPR:$rs2)), GPR:$rs1)),
530 def : Pat<(XLenVT (and (shiftop<srl> GPR:$rs1, (XLenVT GPR:$rs2)), 1)),
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)>;
538 def : Pat<(XLenVT (and GPR:$rs1, BCLRMask:$mask)),
540 def : Pat<(XLenVT (or GPR:$rs1, SingleBitSetMask:$mask)),
542 def : Pat<(XLenVT (xor GPR:$rs1, SingleBitSetMask:$mask)),
545 def : Pat<(XLenVT (and (srl GPR:$rs1, uimmlog2xlen:$shamt), (XLenVT 1))),
548 def : Pat<(XLenVT (seteq (XLenVT (and GPR:$rs1, SingleBitSetMask:$mask)), 0)),
549 (BEXTI (XLenVT (XORI GPR:$rs1, -1)), SingleBitSetMask:$mask)>;
551 def : Pat<(XLenVT (or GPR:$r, BSETINVTwoBitsMask:$i)),
552 (BSETI (XLenVT (BSETI GPR:$r, (TrailingZeros BSETINVTwoBitsMask:$i))),
554 def : Pat<(XLenVT (xor GPR:$r, BSETINVTwoBitsMask:$i)),
555 (BINVI (XLenVT (BINVI GPR:$r, (TrailingZeros BSETINVTwoBitsMask:$i))),
557 def : Pat<(XLenVT (or GPR:$r, BSETINVORIMask:$i)),
558 (BSETI (XLenVT (ORI GPR:$r, (BSETINVORIMaskLow BSETINVORIMask:$i))),
560 def : Pat<(XLenVT (xor GPR:$r, BSETINVORIMask:$i)),
561 (BINVI (XLenVT (XORI GPR:$r, (BSETINVORIMaskLow BSETINVORIMask:$i))),
563 def : Pat<(XLenVT (and GPR:$r, BCLRITwoBitsMask:$i)),
564 (BCLRI (XLenVT (BCLRI GPR:$r, (BCLRITwoBitsMaskLow BCLRITwoBitsMask:$i))),
566 def : Pat<(XLenVT (and GPR:$r, BCLRIANDIMask:$i)),
567 (BCLRI (XLenVT (ANDI GPR:$r, (BCLRIANDIMaskLow BCLRIANDIMask:$i))),
595 (MAX GPR:$rs1, (XLenVT (SUBW (XLenVT X0), GPR:$rs1)))>;
599 def : Pat<(XLenVT (sext_inreg GPR:$rs1, i8)), (SEXT_B GPR:$rs1)>;
600 def : Pat<(XLenVT (sext_inreg GPR:$rs1, i16)), (SEXT_H GPR:$rs1)>;
617 def : Pat<(or (and (shl GPR:$rs2, (XLenVT 8)), 0xFFFF),
618 (zexti8 (XLenVT GPR:$rs1))),
620 def : Pat<(or (shl (zexti8 (XLenVT GPR:$rs2)), (XLenVT 8)),
621 (zexti8 (XLenVT GPR:$rs1))),
623 def : Pat<(and (or (shl GPR:$rs2, (XLenVT 8)),
624 (zexti8 (XLenVT GPR:$rs1))), 0xFFFF),
627 def : Pat<(binop_allhusers<or> (shl GPR:$rs2, (XLenVT 8)),
628 (zexti8 (XLenVT GPR:$rs1))),
654 def : Pat<(i32 (and GPR:$rs, 0xFFFF)), (PACK GPR:$rs, (XLenVT X0))>;
656 def : Pat<(i64 (and GPR:$rs, 0xFFFF)), (PACKW GPR:$rs, (XLenVT X0))>;
662 def : Pat<(XLenVT (add_like_non_imm12 (shl GPR:$rs1, (XLenVT i)), GPR:$rs2)),
664 def : Pat<(XLenVT (riscv_shl_add GPR:$rs1, (XLenVT i), GPR:$rs2)),
669 def : Pat<(XLenVT (add_like_non_imm12 pat:$rs1, GPR:$rs2)),
673 def : Pat<(add_like (XLenVT GPR:$r), CSImm12MulBy4:$i),
674 (SH2ADD (XLenVT (ADDI (XLenVT X0), (SimmShiftRightBy2XForm CSImm12MulBy4:$i))),
676 def : Pat<(add_like (XLenVT GPR:$r), CSImm12MulBy8:$i),
677 (SH3ADD (XLenVT (ADDI (XLenVT X0), (SimmShiftRightBy3XForm CSImm12MulBy8:$i))),
688 (SLLI_UW (XLenVT (SRLI GPR:$rs1, Shifted32OnesMask:$mask)),
692 def : Pat<(i64 (and GPR:$rs, 0xFFFFFFFF)), (ADD_UW GPR:$rs, (XLenVT X0))>;
696 def : Pat<(i64 (add_like_non_imm12 (shl (and GPR:$rs1, 0xFFFFFFFF), (i64 i)), (XLenVT GPR:$rs2))),
702 def : Pat<(i64 (add_like_non_imm12 (and (shl GPR:$rs1, (i64 1)), 0x1FFFFFFFF), (XLenVT GPR:$rs2))),
704 def : Pat<(i64 (add_like_non_imm12 (and (shl GPR:$rs1, (i64 2)), 0x3FFFFFFFF), (XLenVT GPR:$rs2))),
706 def : Pat<(i64 (add_like_non_imm12 (and (shl GPR:$rs1, (i64 3)), 0x7FFFFFFFF), (XLenVT GPR:$rs2))),
712 def : Pat<(i64 (add_like_non_imm12 pat:$rs1, (XLenVT 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)>;
769 def : Pat<(i32 (and GPR:$rs, 0xFFFF)), (PACKW GPR:$rs, (XLenVT X0))>;
792 def : Pat<(and (anyext (or (shl GPR:$rs2, (XLenVT 8)),
806 def : Pat<(zext GPR:$src), (ADD_UW GPR:$src, (XLenVT X0))>;
832 (BSET (XLenVT X0), GPR:$rs2)>;
834 (ADDI (i32 (BSET (XLenVT X0), GPR:$rs2)), -1)>;