mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-02 11:30:10 +00:00
Emit target specific nodes to handle splats starting at zero indicies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bbfc31012b
commit
c800c0d25f
@ -5470,10 +5470,17 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
|
||||
|
||||
// FIXME: pshufb, blends, shifts.
|
||||
if (VT.getVectorNumElements() == 2 ||
|
||||
ShuffleVectorSDNode::isSplatMask(&M[0], VT) ||
|
||||
isPALIGNRMask(M, VT, Subtarget->hasSSSE3()))
|
||||
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))
|
||||
return getTargetShuffleNode(X86ISD::PSHUFHW, dl, VT, V1,
|
||||
X86::getShufflePSHUFHWImmediate(SVOp),
|
||||
|
Loading…
Reference in New Issue
Block a user