@@ -632,17 +632,17 @@ let Predicates = [HasStdExtP] in {
632632 def PSUB_H : RVPBinary_rr<0b1000, 0b00, 0b000, "psub.h">;
633633 def PSUB_B : RVPBinary_rr<0b1000, 0b10, 0b000, "psub.b">;
634634
635- def PDIF_H : RVPBinary_rr<0b1001, 0b00, 0b000, "pdif .h">;
636- def PDIF_B : RVPBinary_rr<0b1001, 0b10, 0b000, "pdif .b">;
635+ def PABD_H : RVPBinary_rr<0b1001, 0b00, 0b000, "pabd .h">;
636+ def PABD_B : RVPBinary_rr<0b1001, 0b10, 0b000, "pabd .b">;
637637
638638 def PSSUB_H : RVPBinary_rr<0b1010, 0b00, 0b000, "pssub.h">;
639639 def PSSUB_B : RVPBinary_rr<0b1010, 0b10, 0b000, "pssub.b">;
640640
641641 def PASUB_H : RVPBinary_rr<0b1011, 0b00, 0b000, "pasub.h">;
642642 def PASUB_B : RVPBinary_rr<0b1011, 0b10, 0b000, "pasub.b">;
643643
644- def PDIFU_H : RVPBinary_rr<0b1101, 0b00, 0b000, "pdifu .h">;
645- def PDIFU_B : RVPBinary_rr<0b1101, 0b10, 0b000, "pdifu .b">;
644+ def PABDU_H : RVPBinary_rr<0b1101, 0b00, 0b000, "pabdu .h">;
645+ def PABDU_B : RVPBinary_rr<0b1101, 0b10, 0b000, "pabdu .b">;
646646
647647 def PSSUBU_H : RVPBinary_rr<0b1110, 0b00, 0b000, "pssubu.h">;
648648 def PSSUBU_B : RVPBinary_rr<0b1110, 0b10, 0b000, "pssubu.b">;
@@ -700,9 +700,9 @@ let Predicates = [HasStdExtP] in {
700700 def SRX : RVPTernary_rrr<0b0101, 0b11, 0b001, "srx">;
701701
702702 def PMULU_H_B01 : RVPBinary_rr<0b0110, 0b00, 0b001, "pmulu.h.b01">;
703- def PDIFSUMU_B : RVPBinary_rr<0b0110, 0b10, 0b001, "pdifsumu .b">;
703+ def PABDSUMU_B : RVPBinary_rr<0b0110, 0b10, 0b001, "pabdsumu .b">;
704704
705- def PDIFSUMAU_B : RVPTernary_rrr<0b0111, 0b10, 0b001, "pdifsumau .b">;
705+ def PABDSUMAU_B : RVPTernary_rrr<0b0111, 0b10, 0b001, "pabdsumau .b">;
706706} // Predicates = [HasStdExtP]
707707let Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in {
708708 def MUL_H01 : RVPBinary_rr<0b0010, 0b01, 0b001, "mul.h01">;
@@ -832,32 +832,25 @@ let Predicates = [HasStdExtP, IsRV64] in {
832832// Note the spec has a 3-bit f field in bits 30:28 with 0 in bit 27.
833833// Here we include the 0 in the f field to reduce number of tablegen classes.
834834let Predicates = [HasStdExtP] in {
835- def PPACK_H : RVPBinary_rr<0b0000, 0b00, 0b100, "ppack.h ">;
835+ def PPAIRE_B : RVPBinary_rr<0b0000, 0b00, 0b100, "ppaire.b ">;
836836
837- def PPACKBT_H : RVPBinary_rr<0b0010, 0b00, 0b100, "ppackbt.h">;
837+ def PPAIREO_B : RVPBinary_rr<0b0010, 0b00, 0b100, "ppaireo.b">;
838+ def PPAIREO_H : RVPBinary_rr<0b0010, 0b01, 0b100, "ppaireo.h">;
838839
839- def PPACKTB_H : RVPBinary_rr<0b0100, 0b00, 0b100, "ppacktb.h">;
840+ def PPAIROE_B : RVPBinary_rr<0b0100, 0b00, 0b100, "ppairoe.b">;
841+ def PPAIROE_H : RVPBinary_rr<0b0100, 0b01, 0b100, "ppairoe.h">;
840842
841- def PPACKT_H : RVPBinary_rr<0b0110, 0b00, 0b100, "ppackt.h">;
843+ def PPAIRO_B : RVPBinary_rr<0b0110, 0b00, 0b100, "ppairo.b">;
844+ def PPAIRO_H : RVPBinary_rr<0b0110, 0b01, 0b100, "ppairo.h">;
842845} // Predicates = [HasStdExtP]
843- let Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only" in {
844- def PACKBT_RV32 : RVPBinary_rr<0b0010, 0b01, 0b100, "packbt">;
845-
846- def PACKTB_RV32 : RVPBinary_rr<0b0100, 0b01, 0b100, "packtb">;
847-
848- def PACKT_RV32 : RVPBinary_rr<0b0110, 0b01, 0b100, "packt">;
849- } // Predicates = [HasStdExtP, IsRV32], DecoderNamespace = "RV32Only"
850846let Predicates = [HasStdExtP, IsRV64] in {
851- def PPACK_W : RVPBinary_rr<0b0000, 0b01, 0b100, "ppack.w ">;
847+ def PPAIRE_H : RVPBinary_rr<0b0000, 0b01, 0b100, "ppaire.h ">;
852848
853- def PPACKBT_W : RVPBinary_rr<0b0010, 0b01, 0b100, "ppackbt.w">;
854- def PACKBT_RV64 : RVPBinary_rr<0b0010, 0b11, 0b100, "packbt">;
849+ def PPAIREO_W : RVPBinary_rr<0b0010, 0b11, 0b100, "ppaireo.w">;
855850
856- def PPACKTB_W : RVPBinary_rr<0b0100, 0b01, 0b100, "ppacktb.w">;
857- def PACKTB_RV64 : RVPBinary_rr<0b0100, 0b11, 0b100, "packtb">;
851+ def PPAIROE_W : RVPBinary_rr<0b0100, 0b11, 0b100, "ppairoe.w">;
858852
859- def PPACKT_W : RVPBinary_rr<0b0110, 0b01, 0b100, "ppackt.w">;
860- def PACKT_RV64 : RVPBinary_rr<0b0110, 0b11, 0b100, "packt">;
853+ def PPAIRO_W : RVPBinary_rr<0b0110, 0b11, 0b100, "ppairo.w">;
861854} // Predicates = [HasStdExtP, IsRV64]
862855
863856let Predicates = [HasStdExtP] in {
@@ -1385,8 +1378,8 @@ let Predicates = [HasStdExtP, IsRV32] in {
13851378 def PSUB_DB : RVPPairBinary_rr<0b1000, 0b10, "psub.db">;
13861379 def SUBD : RVPPairBinary_rr<0b1000, 0b11, "subd">;
13871380
1388- def PDIF_DH : RVPPairBinary_rr<0b1001, 0b00, "pdif .dh">;
1389- def PDIF_DB : RVPPairBinary_rr<0b1001, 0b10, "pdif .db">;
1381+ def PABD_DH : RVPPairBinary_rr<0b1001, 0b00, "pabd .dh">;
1382+ def PABD_DB : RVPPairBinary_rr<0b1001, 0b10, "pabd .db">;
13901383
13911384 def PSSUB_DH : RVPPairBinary_rr<0b1010, 0b00, "pssub.dh">;
13921385 def PSSUB_DW : RVPPairBinary_rr<0b1010, 0b01, "pssub.dw">;
@@ -1396,8 +1389,8 @@ let Predicates = [HasStdExtP, IsRV32] in {
13961389 def PASUB_DW : RVPPairBinary_rr<0b1011, 0b01, "pasub.dw">;
13971390 def PASUB_DB : RVPPairBinary_rr<0b1011, 0b10, "pasub.db">;
13981391
1399- def PDIFU_DH : RVPPairBinary_rr<0b1101, 0b00, "pdifu .dh">;
1400- def PDIFU_DB : RVPPairBinary_rr<0b1101, 0b10, "pdifu .db">;
1392+ def PABDU_DH : RVPPairBinary_rr<0b1101, 0b00, "pabdu .dh">;
1393+ def PABDU_DB : RVPPairBinary_rr<0b1101, 0b10, "pabdu .db">;
14011394
14021395 def PSSUBU_DH : RVPPairBinary_rr<0b1110, 0b00, "pssubu.dh">;
14031396 def PSSUBU_DW : RVPPairBinary_rr<0b1110, 0b01, "pssubu.dw">;
@@ -1413,17 +1406,17 @@ let Predicates = [HasStdExtP, IsRV32] in {
14131406 def PSSH1SADD_DH : RVPPairBinaryShift_rr<0b011, 0b00, "pssh1sadd.dh">;
14141407 def PSSH1SADD_DW : RVPPairBinaryShift_rr<0b011, 0b01, "pssh1sadd.dw">;
14151408
1416- def PPACK_DH : RVPPairBinaryPack_rr<0b000, 0b00, "ppack.dh ">;
1417- def PPACK_DW : RVPPairBinaryPack_rr<0b000, 0b01, "ppack.dw ">;
1409+ def PPAIRE_DB : RVPPairBinaryPack_rr<0b000, 0b00, "ppaire.db ">;
1410+ def PPAIRE_DH : RVPPairBinaryPack_rr<0b000, 0b01, "ppaire.dh ">;
14181411
1419- def PPACKBT_DH : RVPPairBinaryPack_rr<0b001, 0b00, "ppackbt.dh ">;
1420- def PPACKBT_DW : RVPPairBinaryPack_rr<0b001, 0b01, "ppackbt.dw ">;
1412+ def PPAIREO_DB : RVPPairBinaryPack_rr<0b001, 0b00, "ppaireo.db ">;
1413+ def PPAIREO_DH : RVPPairBinaryPack_rr<0b001, 0b01, "ppaireo.dh ">;
14211414
1422- def PPACKTB_DH : RVPPairBinaryPack_rr<0b010, 0b00, "ppacktb.dh ">;
1423- def PPACKTB_DW : RVPPairBinaryPack_rr<0b010, 0b01, "ppacktb.dw ">;
1415+ def PPAIROE_DB : RVPPairBinaryPack_rr<0b010, 0b00, "ppairoe.db ">;
1416+ def PPAIROE_DH : RVPPairBinaryPack_rr<0b010, 0b01, "ppairoe.dh ">;
14241417
1425- def PPACKT_DH : RVPPairBinaryPack_rr<0b011, 0b00, "ppackt.dh ">;
1426- def PPACKT_DW : RVPPairBinaryPack_rr<0b011, 0b01, "ppackt.dw ">;
1418+ def PPAIRO_DB : RVPPairBinaryPack_rr<0b011, 0b00, "ppairo.db ">;
1419+ def PPAIRO_DH : RVPPairBinaryPack_rr<0b011, 0b01, "ppairo.dh ">;
14271420
14281421 def PAS_DHX : RVPPairBinaryExchanged_rr<0b0000, 0b00, "pas.dhx">;
14291422 def PSA_DHX : RVPPairBinaryExchanged_rr<0b0000, 0b10, "psa.dhx">;
@@ -1511,15 +1504,15 @@ let Predicates = [HasStdExtP] in {
15111504 def: Pat<(XLenVecI16VT (avgflooru GPR:$rs1, GPR:$rs2)), (PAADDU_H GPR:$rs1, GPR:$rs2)>;
15121505 def: Pat<(XLenVecI16VT (riscv_pasub GPR:$rs1, GPR:$rs2)), (PASUB_H GPR:$rs1, GPR:$rs2)>;
15131506 def: Pat<(XLenVecI16VT (riscv_pasubu GPR:$rs1, GPR:$rs2)), (PASUBU_H GPR:$rs1, GPR:$rs2)>;
1514-
1507+
15151508 // 8-bit absolute difference patterns
1516- def: Pat<(XLenVecI8VT (abds GPR:$rs1, GPR:$rs2)), (PDIF_B GPR:$rs1, GPR:$rs2)>;
1517- def: Pat<(XLenVecI8VT (abdu GPR:$rs1, GPR:$rs2)), (PDIFU_B GPR:$rs1, GPR:$rs2)>;
1518-
1509+ def: Pat<(XLenVecI8VT (abds GPR:$rs1, GPR:$rs2)), (PABD_B GPR:$rs1, GPR:$rs2)>;
1510+ def: Pat<(XLenVecI8VT (abdu GPR:$rs1, GPR:$rs2)), (PABDU_B GPR:$rs1, GPR:$rs2)>;
1511+
15191512 // 16-bit absolute difference patterns
1520- def: Pat<(XLenVecI16VT (abds GPR:$rs1, GPR:$rs2)), (PDIF_H GPR:$rs1, GPR:$rs2)>;
1521- def: Pat<(XLenVecI16VT (abdu GPR:$rs1, GPR:$rs2)), (PDIFU_H GPR:$rs1, GPR:$rs2)>;
1522-
1513+ def: Pat<(XLenVecI16VT (abds GPR:$rs1, GPR:$rs2)), (PABD_H GPR:$rs1, GPR:$rs2)>;
1514+ def: Pat<(XLenVecI16VT (abdu GPR:$rs1, GPR:$rs2)), (PABDU_H GPR:$rs1, GPR:$rs2)>;
1515+
15231516 // 8-bit logical shift left patterns
15241517 def: Pat<(XLenVecI8VT (shl GPR:$rs1, (XLenVecI8VT (splat_vector uimm3:$shamt)))),
15251518 (PSLLI_B GPR:$rs1, uimm3:$shamt)>;
@@ -1615,22 +1608,22 @@ let Predicates = [HasStdExtP, IsRV64] in {
16151608 (XLenVT GPR:$c), (XLenVT GPR:$d),
16161609 (XLenVT undef), (XLenVT undef),
16171610 (XLenVT undef), (XLenVT undef))),
1618- (PPACK_W (PPACK_H GPR:$a, GPR:$b), (PPACK_H GPR:$c, GPR:$d))>;
1611+ (PPAIRE_H (PPAIRE_B GPR:$a, GPR:$b), (PPAIRE_B GPR:$c, GPR:$d))>;
16191612
16201613 def : Pat<(v8i8 (build_vector (XLenVT GPR:$a), (XLenVT GPR:$b),
16211614 (XLenVT GPR:$c), (XLenVT GPR:$d),
16221615 (XLenVT GPR:$e), (XLenVT GPR:$f),
16231616 (XLenVT GPR:$g), (XLenVT GPR:$h))),
1624- (PACK(PPACK_W (PPACK_H GPR:$a, GPR:$b), (PPACK_H GPR:$c, GPR:$d)),
1625- (PPACK_W (PPACK_H GPR:$e, GPR:$f), (PPACK_H GPR:$g, GPR:$h)))>;
1617+ (PACK (PPAIRE_H (PPAIRE_B GPR:$a, GPR:$b), (PPAIRE_B GPR:$c, GPR:$d)),
1618+ (PPAIRE_H (PPAIRE_B GPR:$e, GPR:$f), (PPAIRE_B GPR:$g, GPR:$h)))>;
16261619
16271620 def : Pat<(v4i16 (build_vector (XLenVT GPR:$a), (XLenVT GPR:$b),
16281621 (XLenVT undef), (XLenVT undef))),
1629- (PPACK_W GPR:$a, GPR:$b)>;
1622+ (PPAIRE_H GPR:$a, GPR:$b)>;
16301623
16311624 def : Pat<(v4i16 (build_vector (XLenVT GPR:$a), (XLenVT GPR:$b),
16321625 (XLenVT GPR:$c), (XLenVT GPR:$d))),
1633- (PACK (PPACK_W GPR:$a, GPR:$b), (PPACK_W GPR:$c, GPR:$d))>;
1626+ (PACK (PPAIRE_H GPR:$a, GPR:$b), (PPAIRE_H GPR:$c, GPR:$d))>;
16341627
16351628 def : Pat<(v2i32 (build_vector (XLenVT GPR:$a), (XLenVT GPR:$b))),
16361629 (PACK GPR:$a, GPR:$b)>;
0 commit comments