@@ -4562,7 +4562,7 @@ static bool isInterleaveShuffle(ArrayRef<int> Mask, MVT VT, int &EvenSrc,
45624562
45634563/// Is this mask representing a masked combination of two slides?
45644564static bool isMaskedSlidePair(ArrayRef<int> Mask,
4565- std::pair<int, int> SrcInfo[2] ) {
4565+ std::array<std:: pair<int, int>, 2> &SrcInfo ) {
45664566 if (!llvm::isMaskedSlidePair(Mask, Mask.size(), SrcInfo))
45674567 return false;
45684568
@@ -4580,7 +4580,8 @@ static bool isMaskedSlidePair(ArrayRef<int> Mask,
45804580
45814581// Exactly matches the semantics of a previously existing custom matcher
45824582// to allow migration to new matcher without changing output.
4583- static bool isElementRotate(std::pair<int, int> SrcInfo[2], unsigned NumElts) {
4583+ static bool isElementRotate(std::array<std::pair<int, int>, 2> &SrcInfo,
4584+ unsigned NumElts) {
45844585 if (SrcInfo[1].first == -1)
45854586 return true;
45864587 return SrcInfo[0].second < 0 && SrcInfo[1].second > 0 &&
@@ -5581,7 +5582,7 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
55815582 // without masking. Avoid matching bit rotates (which are not also element
55825583 // rotates) as slide pairs. This is a performance heuristic, not a
55835584 // functional check.
5584- std::pair<int, int> SrcInfo[2] ;
5585+ std::array<std:: pair<int, int>, 2> SrcInfo ;
55855586 unsigned RotateAmt;
55865587 MVT RotateVT;
55875588 if (::isMaskedSlidePair(Mask, SrcInfo) &&
@@ -5941,7 +5942,7 @@ bool RISCVTargetLowering::isShuffleMaskLegal(ArrayRef<int> M, EVT VT) const {
59415942 if (SVT.getScalarType() == MVT::i1)
59425943 return false;
59435944
5944- std::pair<int, int> SrcInfo[2] ;
5945+ std::array<std:: pair<int, int>, 2> SrcInfo ;
59455946 int Dummy1, Dummy2;
59465947 return ShuffleVectorInst::isReverseMask(M, NumElts) ||
59475948 (::isMaskedSlidePair(M, SrcInfo) &&
0 commit comments