llvm.org GIT mirror llvm / 7b04de6
[X86] createMMXBuildVector - call with BuildVectorSDNode directly. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364030 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 4 months ago
1 changed file(s) with 5 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
3461834618 return SDValue();
3461934619 }
3462034620
34621 static SDValue createMMXBuildVector(SDValue N, SelectionDAG &DAG,
34621 static SDValue createMMXBuildVector(BuildVectorSDNode *BV, SelectionDAG &DAG,
3462234622 const X86Subtarget &Subtarget) {
34623 SDLoc DL(N);
34624 unsigned NumElts = N.getNumOperands();
34625
34626 auto *BV = cast(N);
34623 SDLoc DL(BV);
34624 unsigned NumElts = BV->getNumOperands();
3462734625 SDValue Splat = BV->getSplatValue();
3462834626
3462934627 // Build MMX element from integer GPR or SSE float values.
3467134669 Ops.append(NumElts, Splat);
3467234670 } else {
3467334671 for (unsigned i = 0; i != NumElts; ++i)
34674 Ops.push_back(CreateMMXElement(N.getOperand(i)));
34672 Ops.push_back(CreateMMXElement(BV->getOperand(i)));
3467534673 }
3467634674
3467734675 // Use tree of PUNPCKLs to build up general MMX vector.
3477634774 if (N0.getOpcode() == ISD::BUILD_VECTOR &&
3477734775 (SrcVT == MVT::v2f32 || SrcVT == MVT::v2i32 || SrcVT == MVT::v4i16 ||
3477834776 SrcVT == MVT::v8i8))
34779 return createMMXBuildVector(N0, DAG, Subtarget);
34777 return createMMXBuildVector(cast(N0), DAG, Subtarget);
3478034778
3478134779 // Detect bitcasts between element or subvector extraction to x86mmx.
3478234780 if ((N0.getOpcode() == ISD::EXTRACT_VECTOR_ELT ||