Lines Matching refs:SVOp
4022 SDValue Compact8x32ShuffleNode(ShuffleVectorSDNode *SVOp,
4024 MVT VT = SVOp->getSimpleValueType(0);
4025 SDLoc dl(SVOp);
4030 ArrayRef<int> Mask = SVOp->getMask();
4049 SDValue Op0 = SVOp->getOperand(0);
4050 SDValue Op1 = SVOp->getOperand(1);
4318 static unsigned getShuffleVPERM2X128Immediate(ShuffleVectorSDNode *SVOp) {
4319 MVT VT = SVOp->getSimpleValueType(0);
4325 if (SVOp->getMaskElt(i) > 0) {
4326 FstHalf = SVOp->getMaskElt(i)/HalfSize;
4331 if (SVOp->getMaskElt(i) > 0) {
4332 SndHalf = SVOp->getMaskElt(i)/HalfSize;
4657 static unsigned getShufflePALIGNRImmediate(ShuffleVectorSDNode *SVOp) {
4658 MVT VT = SVOp->getSimpleValueType(0);
4669 Val = SVOp->getMaskElt(i);
4756 static SDValue CommuteVectorShuffle(ShuffleVectorSDNode *SVOp,
4758 MVT VT = SVOp->getSimpleValueType(0);
4763 int Idx = SVOp->getMaskElt(i);
4772 return DAG.getVectorShuffle(VT, SDLoc(SVOp), SVOp->getOperand(1),
4773 SVOp->getOperand(0), &MaskVec[0]);
5260 static unsigned getNumOfConsecutiveZeros(ShuffleVectorSDNode *SVOp,
5267 SDValue Elt = getShuffleScalarElt(SVOp, Index, DAG, 0);
5286 bool isShuffleMaskConsecutive(ShuffleVectorSDNode *SVOp,
5293 int Idx = SVOp->getMaskElt(i);
5314 static bool isVectorShiftRight(ShuffleVectorSDNode *SVOp, SelectionDAG &DAG,
5317 SVOp->getSimpleValueType(0).getVectorNumElements();
5319 SVOp, NumElems, false /* check zeros from right */, DAG,
5320 SVOp->getMaskElt(0));
5333 if (!isShuffleMaskConsecutive(SVOp,
5343 ShVal = SVOp->getOperand(OpSrc);
5349 static bool isVectorShiftLeft(ShuffleVectorSDNode *SVOp, SelectionDAG &DAG,
5352 SVOp->getSimpleValueType(0).getVectorNumElements();
5354 SVOp, NumElems, true /* check zeros from left */, DAG,
5355 NumElems - SVOp->getMaskElt(NumElems - 1) - 1);
5368 if (!isShuffleMaskConsecutive(SVOp,
5378 ShVal = SVOp->getOperand(OpSrc);
5384 static bool isVectorShift(ShuffleVectorSDNode *SVOp, SelectionDAG &DAG,
5388 if (!SVOp->getSimpleValueType(0).is128BitVector())
5391 if (isVectorShiftLeft(SVOp, DAG, isLeft, ShVal, ShAmt) ||
5392 isVectorShiftRight(SVOp, DAG, isLeft, ShVal, ShAmt))
5790 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
5794 if ((!SVOp->isSplat()) || SVOp->getMaskElt(0) != 0)
5905 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(ExtractedFromVec);
5906 SDValue ShuffleVec = SVOp->getOperand(0);
5911 int ShuffleIdx = SVOp->getMaskElt(Idx);
6964 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
6965 ArrayRef<int> Mask = SVOp->getMask();
6996 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
6997 ArrayRef<int> Mask = SVOp->getMask();
7036 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
7037 ArrayRef<int> Mask = SVOp->getMask();
7130 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
7131 ArrayRef<int> Mask = SVOp->getMask();
7604 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
7605 ArrayRef<int> OrigMask = SVOp->getMask();
7681 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
7682 ArrayRef<int> OrigMask = SVOp->getMask();
7920 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
7921 ArrayRef<int> Mask = SVOp->getMask();
7939 return CommuteVectorShuffle(SVOp, DAG);
7973 for (int M : SVOp->getMask())
7985 return CommuteVectorShuffle(SVOp, DAG);
7991 for (int M : SVOp->getMask().slice(0, NumElements / 2))
7997 return CommuteVectorShuffle(SVOp, DAG);
8060 static SDValue LowerVECTOR_SHUFFLEtoBlend(ShuffleVectorSDNode *SVOp,
8064 MVT VT = SVOp->getSimpleValueType(0);
8066 assert(isBlendMask(SVOp->getMask(), VT, Subtarget->hasSSE41(),
8070 SDValue V1 = SVOp->getOperand(0);
8071 SDValue V2 = SVOp->getOperand(1);
8072 SDLoc dl(SVOp);
8150 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
8151 SDValue V1 = SVOp->getOperand(0);
8152 SDValue V2 = SVOp->getOperand(1);
8153 SDLoc dl(SVOp);
8168 int EltIdx = SVOp->getMaskElt(i);
8269 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(NewV.getNode());
8270 TargetMask = pshufhw ? getShufflePSHUFHWImmediate(SVOp):
8271 getShufflePSHUFLWImmediate(SVOp);
8279 if (SVOp->isSplat())
8280 return PromoteSplat(SVOp, DAG);
8323 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(NewV.getNode());
8326 getShufflePSHUFLWImmediate(SVOp), DAG);
8347 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(NewV.getNode());
8350 getShufflePSHUFHWImmediate(SVOp), DAG);
8389 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
8390 SDValue V1 = SVOp->getOperand(0);
8391 SDValue V2 = SVOp->getOperand(1);
8392 SDLoc dl(SVOp);
8397 SmallVector<int, 16> MaskVals(SVOp->getMask().begin(), SVOp->getMask().end());
8405 static SDValue LowerVECTOR_SHUFFLEv16i8(ShuffleVectorSDNode *SVOp,
8409 SDValue V1 = SVOp->getOperand(0);
8410 SDValue V2 = SVOp->getOperand(1);
8411 SDLoc dl(SVOp);
8412 ArrayRef<int> MaskVals = SVOp->getMask();
8416 if (SVOp->isSplat())
8417 return PromoteSplat(SVOp, DAG);
8534 SDValue LowerVECTOR_SHUFFLEv32i8(ShuffleVectorSDNode *SVOp,
8537 MVT VT = SVOp->getSimpleValueType(0);
8538 SDValue V1 = SVOp->getOperand(0);
8539 SDValue V2 = SVOp->getOperand(1);
8540 SDLoc dl(SVOp);
8541 SmallVector<int, 32> MaskVals(SVOp->getMask().begin(), SVOp->getMask().end());
8568 SVOp,
8570 MVT VT = SVOp->getSimpleValueType(0);
8571 SDLoc dl(SVOp);
8579 return SDValue(SVOp, 0);
8592 int EltIdx = SVOp->getMaskElt(i+j);
8603 SDValue V1 = DAG.getNode(ISD::BITCAST, dl, NewVT, SVOp->getOperand(0));
8604 SDValue V2 = DAG.getNode(ISD::BITCAST, dl, NewVT, SVOp->getOperand(1));
8646 LowerVECTOR_SHUFFLE_256(ShuffleVectorSDNode *SVOp, SelectionDAG &DAG) {
8648 SDValue NewOp = Compact8x32ShuffleNode(SVOp, DAG);
8652 MVT VT = SVOp->getSimpleValueType(0);
8657 SDLoc dl(SVOp);
8673 int Idx = SVOp->getMaskElt(i+LaneStart);
8714 int Idx = SVOp->getMaskElt(i+LaneStart);
8728 SVOp->getOperand(Input),
8738 SDValue Op0 = Extract128BitVector(SVOp->getOperand(InputUsed[0] / 2),
8743 Extract128BitVector(SVOp->getOperand(InputUsed[1] / 2),
8759 LowerVECTOR_SHUFFLE_128v4(ShuffleVectorSDNode *SVOp, SelectionDAG &DAG) {
8760 SDValue V1 = SVOp->getOperand(0);
8761 SDValue V2 = SVOp->getOperand(1);
8762 SDLoc dl(SVOp);
8763 MVT VT = SVOp->getSimpleValueType(0);
8769 SmallVector<int, 8> PermMask(SVOp->getMask().begin(), SVOp->getMask().end());
8983 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
8990 if (SVOp->getMaskElt(1) != -1)
9003 if (NumElems == 2 || !isMOVLMask(SVOp->getMask(), VT))
9012 getShuffleSHUFImmediate(SVOp), DAG);
9034 static SDValue getINSERTPS(ShuffleVectorSDNode *SVOp, SDLoc &dl,
9043 MVT VT = SVOp->getSimpleValueType(0);
9045 SDValue V1 = SVOp->getOperand(0);
9046 SDValue V2 = SVOp->getOperand(1);
9047 auto Mask = SVOp->getMask();
9118 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
9133 if (SVOp->getMaskElt(1U << Shift) == 1)
9144 int EltIdx = SVOp->getMaskElt(i);
9195 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
9201 if (isZeroShuffle(SVOp))
9205 if (SVOp->isSplat()) {
9221 SDValue NewOp = RewriteAsNarrowerShuffle(SVOp, DAG);
9227 SDValue NewOp = RewriteAsNarrowerShuffle(SVOp, DAG);
9236 SDValue NewOp = RewriteAsNarrowerShuffle(SVOp, DAG);
9250 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
9281 return CommuteVectorShuffle(SVOp, DAG);
9304 SmallVector<int, 8> M(SVOp->getMask().begin(), SVOp->getMask().end());
9332 unsigned TargetMask = getShuffleSHUFImmediate(SVOp);
9347 getShufflePALIGNRImmediate(SVOp),
9354 bool isShift = HasSSE2 && isVectorShift(SVOp, DAG, isLeft, ShVal, ShAmt);
9393 return CommuteVectorShuffle(SVOp, DAG);
9465 return CommuteVectorShuffle(SVOp, DAG);
9472 SVOp->getSplatIndex() == 0 && V2IsUndef) {
9479 getShufflePSHUFHWImmediate(SVOp),
9484 getShufflePSHUFLWImmediate(SVOp),
9490 return LowerVECTOR_SHUFFLEtoBlend(SVOp, MaskValue, Subtarget, DAG);
9494 getShuffleSHUFImmediate(SVOp), DAG);
9514 getShuffleSHUFImmediate(SVOp), DAG);
9516 getShuffleSHUFImmediate(SVOp), DAG);
9527 V2, getShuffleVPERM2X128Immediate(SVOp), DAG);
9530 return getINSERTPS(SVOp, dl, DAG);
9574 SDValue NewOp = LowerVECTOR_SHUFFLEv16i8(SVOp, Subtarget, DAG);
9580 SDValue NewOp = LowerVECTOR_SHUFFLEv32i8(SVOp, Subtarget, DAG);
9588 return LowerVECTOR_SHUFFLE_128v4(SVOp, DAG);
9592 return LowerVECTOR_SHUFFLE_256(SVOp, DAG);
18299 static bool isShuffleHigh128VectorInsertLow(ShuffleVectorSDNode *SVOp) {
18300 EVT VT = SVOp->getValueType(0);
18305 if (!isUndefOrEqual(SVOp->getMaskElt(i), j) ||
18306 SVOp->getMaskElt(j) >= 0)
18315 static bool isShuffleLow128VectorInsertHigh(ShuffleVectorSDNode *SVOp) {
18316 EVT VT = SVOp->getValueType(0);
18321 if (!isUndefOrEqual(SVOp->getMaskElt(i), j) ||
18322 SVOp->getMaskElt(j) >= 0)
18333 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(N);
18334 SDValue V1 = SVOp->getOperand(0);
18335 SDValue V2 = SVOp->getOperand(1);
18336 EVT VT = SVOp->getValueType(0);
18363 if (!isUndefOrEqual(SVOp->getMaskElt(i), i) ||
18364 !isUndefOrEqual(SVOp->getMaskElt(i+NumElems/2), NumElems))
18407 if (isShuffleHigh128VectorInsertLow(SVOp)) {
18414 if (isShuffleLow128VectorInsertHigh(SVOp)) {
18848 ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(N);
18850 CanFold = SVOp->getMaskElt(i) == (int)(i * 2);
18852 CanFold = SVOp->getMaskElt(i) < 0;
18858 return DAG.getVectorShuffle(VT, dl, NewBinOp, N1, &SVOp->getMask()[0]);