Skip to content

Commit 46341d5

Browse files
authored
[RISCV] Update P extension to the 018 version of the spec. (#170399)
Rename the PPACK* instructions to PPAIR*. Rename PDIF* to PABD*. Remove Zba/Zbb instructions from P. https://www.jhauser.us/RISCV/ext-P/
1 parent 446a3a1 commit 46341d5

19 files changed

+190
-1596
lines changed

clang/test/Driver/print-supported-extensions-riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
// CHECK-NEXT: xwchc 2.2 'Xwchc' (WCH/QingKe additional compressed opcodes)
218218
// CHECK-EMPTY:
219219
// CHECK-NEXT: Experimental extensions
220-
// CHECK-NEXT: p 0.15 'P' ('Base P' (Packed SIMD))
220+
// CHECK-NEXT: p 0.18 'P' ('Base P' (Packed SIMD))
221221
// CHECK-NEXT: zibi 0.1 'Zibi' (Branch with Immediate)
222222
// CHECK-NEXT: zicfilp 1.0 'Zicfilp' (Landing pad)
223223
// CHECK-NEXT: zicfiss 1.0 'Zicfiss' (Shadow stack)

llvm/docs/RISCVUsage.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ LLVM supports (to various degrees) a number of experimental extensions. All exp
333333

334334
The primary goal of experimental support is to assist in the process of ratification by providing an existence proof of an implementation, and simplifying efforts to validate the value of a proposed extension against large code bases. Experimental extensions are expected to either transition to ratified status, or be eventually removed. The decision on whether to accept an experimental extension is currently done on an entirely case by case basis; if you want to propose one, attending the bi-weekly RISC-V sync-up call is strongly advised.
335335

336+
``experimental-p``
337+
LLVM implements the `018 draft specification <https://www.jhauser.us/RISCV/ext-P/>`__.
338+
336339
``experimental-zalasr``
337340
LLVM implements the `0.9 draft specification <https://github.com/riscv/riscv-zalasr/releases/tag/v0.9>`__.
338341

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,38 +1106,18 @@ def HasStdExtSmctrOrSsctr : Predicate<"Subtarget->hasStdExtSmctrOrSsctr()">,
11061106

11071107
// Packed SIMD Extensions
11081108
def FeatureStdExtP
1109-
: RISCVExperimentalExtension<0, 15,
1109+
: RISCVExperimentalExtension<0, 18,
11101110
"'Base P' (Packed SIMD)">;
11111111
def HasStdExtP : Predicate<"Subtarget->hasStdExtP()">,
11121112
AssemblerPredicate<(all_of FeatureStdExtP),
11131113
"'Base P' (Packed SIMD)">;
11141114

1115-
def HasStdExtZbaOrP
1116-
: Predicate<"Subtarget->hasStdExtZba() || Subtarget->hasStdExtP()">,
1117-
AssemblerPredicate<(any_of FeatureStdExtZba, FeatureStdExtP),
1118-
"'Zba' (Address Generation Instructions) or "
1119-
"'Base P' (Packed-SIMD)">;
1120-
1121-
def HasStdExtZbbOrP
1122-
: Predicate<"Subtarget->hasStdExtZbb() || Subtarget->hasStdExtP()">,
1123-
AssemblerPredicate<(any_of FeatureStdExtZbb, FeatureStdExtP),
1124-
"'Zbb' (Basic Bit-Manipulation) or "
1125-
"'Base P' (Packed-SIMD)">;
1126-
11271115
def HasStdExtZbkbOrP
11281116
: Predicate<"Subtarget->hasStdExtZbkb() || Subtarget->hasStdExtP()">,
11291117
AssemblerPredicate<(any_of FeatureStdExtZbkb, FeatureStdExtP),
11301118
"'Zbkb' (Bitmanip instructions for Cryptography) or "
11311119
"'Base P' (Packed-SIMD)">;
11321120

1133-
def HasStdExtZbbOrZbkbOrP
1134-
: Predicate<"Subtarget->hasStdExtZbb() || Subtarget->hasStdExtZbkb() || "
1135-
"Subtarget->hasStdExtP()">,
1136-
AssemblerPredicate<(any_of FeatureStdExtZbb, FeatureStdExtZbkb, FeatureStdExtP),
1137-
"'Zbb' (Basic Bit-Manipulation) or "
1138-
"'Zbkb' (Bitmanip instructions for Cryptography) or "
1139-
"'Base P' (Packed-SIMD)">;
1140-
11411121
//===----------------------------------------------------------------------===//
11421122
// Vendor extensions
11431123
//===----------------------------------------------------------------------===//

llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
19011901
0);
19021902

19031903
MachineSDNode *PackDH = CurDAG->getMachineNode(
1904-
RISCV::PPACK_DH, DL, MVT::Untyped, {RegPair0, RegPair1});
1904+
RISCV::PPAIRE_DB, DL, MVT::Untyped, {RegPair0, RegPair1});
19051905

19061906
SDValue Lo = CurDAG->getTargetExtractSubreg(RISCV::sub_gpr_even, DL,
19071907
MVT::i32, SDValue(PackDH, 0));

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
337337

338338
setOperationAction(ISD::EH_DWARF_CFA, MVT::i32, Custom);
339339

340-
if (!Subtarget.hasStdExtZbb() && !Subtarget.hasStdExtP() &&
341-
!Subtarget.hasVendorXTHeadBb() && !Subtarget.hasVendorXqcibm() &&
342-
!Subtarget.hasVendorXAndesPerf() &&
340+
if (!Subtarget.hasStdExtZbb() && !Subtarget.hasVendorXTHeadBb() &&
341+
!Subtarget.hasVendorXqcibm() && !Subtarget.hasVendorXAndesPerf() &&
343342
!(Subtarget.hasVendorXCValu() && !Subtarget.is64Bit()))
344343
setOperationAction(ISD::SIGN_EXTEND_INREG, {MVT::i8, MVT::i16}, Expand);
345344

@@ -412,7 +411,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
412411
setOperationAction(ISD::BITREVERSE, MVT::i8, Custom);
413412
}
414413

415-
if (Subtarget.hasStdExtZbb() || Subtarget.hasStdExtP() ||
414+
if (Subtarget.hasStdExtZbb() ||
416415
(Subtarget.hasVendorXCValu() && !Subtarget.is64Bit())) {
417416
setOperationAction({ISD::SMIN, ISD::SMAX, ISD::UMIN, ISD::UMAX}, XLenVT,
418417
Legal);
@@ -423,9 +422,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
423422
setOperationAction({ISD::CTTZ, ISD::CTTZ_ZERO_UNDEF}, MVT::i32, Custom);
424423
} else {
425424
setOperationAction(ISD::CTTZ, XLenVT, Expand);
426-
// If have a CLZW, but not CTZW, custom promote i32.
427-
if (Subtarget.hasStdExtP() && Subtarget.is64Bit())
428-
setOperationAction({ISD::CTTZ, ISD::CTTZ_ZERO_UNDEF}, MVT::i32, Custom);
429425
}
430426

431427
if (!Subtarget.hasCPOPLike()) {
@@ -15045,24 +15041,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
1504515041
bool IsCTZ =
1504615042
N->getOpcode() == ISD::CTTZ || N->getOpcode() == ISD::CTTZ_ZERO_UNDEF;
1504715043

15048-
// Without Zbb, lower as 32 - clzw(~X & (X-1))
15049-
if (IsCTZ && !Subtarget.hasStdExtZbb()) {
15050-
assert(Subtarget.hasStdExtP());
15051-
15052-
NewOp0 = DAG.getFreeze(NewOp0);
15053-
SDValue Not = DAG.getNOT(DL, NewOp0, MVT::i64);
15054-
SDValue Minus1 = DAG.getNode(ISD::SUB, DL, MVT::i64, NewOp0,
15055-
DAG.getConstant(1, DL, MVT::i64));
15056-
SDValue And = DAG.getNode(ISD::AND, DL, MVT::i64, Not, Minus1);
15057-
SDValue CLZW = DAG.getNode(RISCVISD::CLZW, DL, MVT::i64, And);
15058-
SDValue Sub = DAG.getNode(ISD::SUB, DL, MVT::i64,
15059-
DAG.getConstant(32, DL, MVT::i64), CLZW);
15060-
SDValue Res = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, MVT::i64, Sub,
15061-
DAG.getValueType(MVT::i32));
15062-
Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Res));
15063-
return;
15064-
}
15065-
1506615044
unsigned Opc = IsCTZ ? RISCVISD::CTZW : RISCVISD::CLZW;
1506715045
SDValue Res = DAG.getNode(Opc, DL, MVT::i64, NewOp0);
1506815046
Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, MVT::i32, Res));

llvm/lib/Target/RISCV/RISCVInstrInfoP.td

Lines changed: 41 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -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]
707707
let 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.
834834
let 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"
850846
let 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

863856
let 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

Comments
 (0)