@@ -4620,7 +4620,7 @@ static bool isAlternating(std::array<std::pair<int, int>, 2> &SrcInfo,
46204620 for (unsigned i = 0; i != Mask.size(); ++i) {
46214621 int M = Mask[i];
46224622 if (M < 0)
4623- continue;
4623+ continue;
46244624 int Src = M >= (int)NumElts;
46254625 int Diff = (int)i - (M % NumElts);
46264626 bool C = Src == SrcInfo[1].first && Diff == SrcInfo[1].second;
@@ -4639,15 +4639,15 @@ static bool isZipEven(std::array<std::pair<int, int>, 2> &SrcInfo,
46394639 ArrayRef<int> Mask) {
46404640 bool Polarity;
46414641 return SrcInfo[0].second == 0 && SrcInfo[1].second == 1 &&
4642- isAlternating(SrcInfo, Mask, Polarity) && Polarity;
4643- ;
4642+ isAlternating(SrcInfo, Mask, Polarity) && Polarity;
4643+ ;
46444644}
46454645
46464646static bool isZipOdd(std::array<std::pair<int, int>, 2> &SrcInfo,
46474647 ArrayRef<int> Mask) {
46484648 bool Polarity;
46494649 return SrcInfo[0].second == 0 && SrcInfo[1].second == -1 &&
4650- isAlternating(SrcInfo, Mask, Polarity) && !Polarity;
4650+ isAlternating(SrcInfo, Mask, Polarity) && !Polarity;
46514651}
46524652
46534653// Lower a deinterleave shuffle to SRL and TRUNC. Factor must be
@@ -4931,8 +4931,7 @@ static SDValue lowerVIZIP(unsigned Opc, SDValue Op0, SDValue Op1,
49314931
49324932 auto [Mask, VL] = getDefaultVLOps(IntVT, ContainerVT, DL, DAG, Subtarget);
49334933 SDValue Passthru = DAG.getUNDEF(ContainerVT);
4934- SDValue Res =
4935- DAG.getNode(Opc, DL, ContainerVT, Op0, Op1, Passthru, Mask, VL);
4934+ SDValue Res = DAG.getNode(Opc, DL, ContainerVT, Op0, Op1, Passthru, Mask, VL);
49364935 if (IntVT.isFixedLengthVector())
49374936 Res = convertFromScalableVector(IntVT, Res, DAG, Subtarget);
49384937 Res = DAG.getBitcast(VT, Res);
@@ -5633,8 +5632,8 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
56335632 ShuffleVectorInst::isDeInterleaveMaskOfFactor(Mask, 2, Index) &&
56345633 1 < count_if(Mask, [](int Idx) { return Idx != -1; })) {
56355634 MVT HalfVT = VT.getHalfNumVectorElementsVT();
5636- unsigned Opc = Index == 0 ?
5637- RISCVISD::RI_VUNZIP2A_VL : RISCVISD::RI_VUNZIP2B_VL;
5635+ unsigned Opc =
5636+ Index == 0 ? RISCVISD::RI_VUNZIP2A_VL : RISCVISD::RI_VUNZIP2B_VL;
56385637 V1 = lowerVIZIP(Opc, V1, DAG.getUNDEF(VT), DL, DAG, Subtarget);
56395638 V2 = lowerVIZIP(Opc, V2, DAG.getUNDEF(VT), DL, DAG, Subtarget);
56405639
@@ -5687,12 +5686,13 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
56875686
56885687 // Prefer vzip2a if available.
56895688 // TODO: Extend to matching zip2b if EvenSrc and OddSrc allow.
5690- if (Subtarget.hasVendorXRivosVizip()) {
5689+ if (Subtarget.hasVendorXRivosVizip()) {
56915690 EvenV = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, DAG.getUNDEF(VT),
56925691 EvenV, DAG.getVectorIdxConstant(0, DL));
5693- OddV = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, DAG.getUNDEF(VT),
5694- OddV, DAG.getVectorIdxConstant(0, DL));
5695- return lowerVIZIP(RISCVISD::RI_VZIP2A_VL, EvenV, OddV, DL, DAG, Subtarget);
5692+ OddV = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, DAG.getUNDEF(VT), OddV,
5693+ DAG.getVectorIdxConstant(0, DL));
5694+ return lowerVIZIP(RISCVISD::RI_VZIP2A_VL, EvenV, OddV, DL, DAG,
5695+ Subtarget);
56965696 }
56975697 return getWideningInterleave(EvenV, OddV, DL, DAG, Subtarget);
56985698 }
@@ -5748,12 +5748,14 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
57485748 if (Subtarget.hasVendorXRivosVizip() && isZipEven(SrcInfo, Mask)) {
57495749 SDValue Src1 = SrcInfo[0].first == 0 ? V1 : V2;
57505750 SDValue Src2 = SrcInfo[1].first == 0 ? V1 : V2;
5751- return lowerVIZIP(RISCVISD::RI_VZIPEVEN_VL, Src1, Src2, DL, DAG, Subtarget);
5751+ return lowerVIZIP(RISCVISD::RI_VZIPEVEN_VL, Src1, Src2, DL, DAG,
5752+ Subtarget);
57525753 }
57535754 if (Subtarget.hasVendorXRivosVizip() && isZipOdd(SrcInfo, Mask)) {
57545755 SDValue Src1 = SrcInfo[1].first == 0 ? V1 : V2;
57555756 SDValue Src2 = SrcInfo[0].first == 0 ? V1 : V2;
5756- return lowerVIZIP(RISCVISD::RI_VZIPODD_VL, Src1, Src2, DL, DAG, Subtarget);
5757+ return lowerVIZIP(RISCVISD::RI_VZIPODD_VL, Src1, Src2, DL, DAG,
5758+ Subtarget);
57575759 }
57585760
57595761 // Build the mask. Note that vslideup unconditionally preserves elements
0 commit comments