llvm.org GIT mirror llvm / 2e46e78
zap unused method. x86 is the only user and already has a more powerfull version git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112571 91177308-0d34-0410-b5e6-96231b3b80d8 Bruno Cardoso Lopes 10 years ago
2 changed file(s) with 0 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
976976 /// been verified as a debug information descriptor.
977977 bool isVerifiedDebugInfoDesc(SDValue Op) const;
978978
979 /// getShuffleScalarElt - Returns the scalar element that will make up the ith
980 /// element of the result of the vector shuffle.
981 SDValue getShuffleScalarElt(const ShuffleVectorSDNode *N, unsigned Idx);
982
983979 /// UnrollVectorOp - Utility function used by legalize and lowering to
984980 /// "unroll" a vector operation by splitting out the scalars and operating
985981 /// on each element individually. If the ResNE is 0, fully unroll the vector
22802280 }
22812281
22822282
2283 /// getShuffleScalarElt - Returns the scalar element that will make up the ith
2284 /// element of the result of the vector shuffle.
2285 SDValue SelectionDAG::getShuffleScalarElt(const ShuffleVectorSDNode *N,
2286 unsigned i) {
2287 EVT VT = N->getValueType(0);
2288 if (N->getMaskElt(i) < 0)
2289 return getUNDEF(VT.getVectorElementType());
2290 unsigned Index = N->getMaskElt(i);
2291 unsigned NumElems = VT.getVectorNumElements();
2292 SDValue V = (Index < NumElems) ? N->getOperand(0) : N->getOperand(1);
2293 Index %= NumElems;
2294
2295 if (V.getOpcode() == ISD::BIT_CONVERT) {
2296 V = V.getOperand(0);
2297 EVT VVT = V.getValueType();
2298 if (!VVT.isVector() || VVT.getVectorNumElements() != (unsigned)NumElems)
2299 return SDValue();
2300 }
2301 if (V.getOpcode() == ISD::SCALAR_TO_VECTOR)
2302 return (Index == 0) ? V.getOperand(0)
2303 : getUNDEF(VT.getVectorElementType());
2304 if (V.getOpcode() == ISD::BUILD_VECTOR)
2305 return V.getOperand(Index);
2306 if (const ShuffleVectorSDNode *SVN = dyn_cast(V))
2307 return getShuffleScalarElt(SVN, Index);
2308 return SDValue();
2309 }
2310
2311
23122283 /// getNode - Gets or creates the specified node.
23132284 ///
23142285 SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT) {