forked from OSchip/llvm-project
Emit target specific nodes to handle splats starting at zero indicies
llvm-svn: 113055
This commit is contained in:
parent
95759917eb
commit
cff7cd18ab
|
@ -5470,10 +5470,17 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
|
||||||
|
|
||||||
// FIXME: pshufb, blends, shifts.
|
// FIXME: pshufb, blends, shifts.
|
||||||
if (VT.getVectorNumElements() == 2 ||
|
if (VT.getVectorNumElements() == 2 ||
|
||||||
ShuffleVectorSDNode::isSplatMask(&M[0], VT) ||
|
|
||||||
isPALIGNRMask(M, VT, Subtarget->hasSSSE3()))
|
isPALIGNRMask(M, VT, Subtarget->hasSSSE3()))
|
||||||
return Op;
|
return Op;
|
||||||
|
|
||||||
|
if (ShuffleVectorSDNode::isSplatMask(&M[0], VT) &&
|
||||||
|
SVOp->getSplatIndex() == 0 && V2IsUndef) {
|
||||||
|
if (VT == MVT::v2f64)
|
||||||
|
return getTargetShuffleNode(X86ISD::UNPCKLPD, dl, VT, V1, V1, DAG);
|
||||||
|
if (VT == MVT::v2i64)
|
||||||
|
return getTargetShuffleNode(X86ISD::PUNPCKLQDQ, dl, VT, V1, V1, DAG);
|
||||||
|
}
|
||||||
|
|
||||||
if (isPSHUFHWMask(M, VT))
|
if (isPSHUFHWMask(M, VT))
|
||||||
return getTargetShuffleNode(X86ISD::PSHUFHW, dl, VT, V1,
|
return getTargetShuffleNode(X86ISD::PSHUFHW, dl, VT, V1,
|
||||||
X86::getShufflePSHUFHWImmediate(SVOp),
|
X86::getShufflePSHUFHWImmediate(SVOp),
|
||||||
|
|
Loading…
Reference in New Issue