diff options
| author | Kevin P. Neal <kevin.neal@sas.com> | 2019-05-30 17:10:21 +0000 |
|---|---|---|
| committer | Kevin P. Neal <kevin.neal@sas.com> | 2019-05-30 17:10:21 +0000 |
| commit | d3db7b40b0538f737c5a519d18845e9db10df025 (patch) | |
| tree | 02522ce1dca59a8460f6942b9034c8feddf80988 /llvm/lib/CodeGen | |
| parent | aeae786bfe89d9f720596707eb675c6d0418aec5 (diff) | |
| download | bcm5719-llvm-d3db7b40b0538f737c5a519d18845e9db10df025.tar.gz bcm5719-llvm-d3db7b40b0538f737c5a519d18845e9db10df025.zip | |
Revert r362112, it broke the bots with the message "Unsupported vector argument or return type"
Differential Revision: http://reviews.llvm.org/D62546
llvm-svn: 362117
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h | 5 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 59 |
2 files changed, 1 insertions, 63 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h index 8beaf145e0f..a0e7c8a89c1 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h @@ -857,11 +857,6 @@ private: SDValue WidenVecOp_FCOPYSIGN(SDNode *N); SDValue WidenVecOp_VECREDUCE(SDNode *N); - /// Helper function to generate a set of operations to perform - /// a vector operation for a wider type. - /// - SDValue UnrollVectorOp_StrictFP(SDNode *N, unsigned ResNE); - //===--------------------------------------------------------------------===// // Vector Widening Utilities Support: LegalizeVectorTypes.cpp //===--------------------------------------------------------------------===// diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index 072f15b1f4c..95aace3dc9a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -1318,63 +1318,6 @@ void DAGTypeLegalizer::SplitVecRes_StrictFPOp(SDNode *N, SDValue &Lo, ReplaceValueWith(SDValue(N, 1), Chain); } -SDValue DAGTypeLegalizer::UnrollVectorOp_StrictFP(SDNode *N, unsigned ResNE) { - SDValue Chain = N->getOperand(0); - EVT VT = N->getValueType(0); - unsigned NE = VT.getVectorNumElements(); - EVT EltVT = VT.getVectorElementType(); - SDLoc dl(N); - - SmallVector<SDValue, 8> Scalars; - SmallVector<SDValue, 4> Operands(N->getNumOperands()); - - // If ResNE is 0, fully unroll the vector op. - if (ResNE == 0) - ResNE = NE; - else if (NE > ResNE) - NE = ResNE; - - //The results of each unrolled operation, including the chain. - EVT ChainVTs[] = {EltVT, MVT::Other}; - SmallVector<SDValue, 8> Chains; - - unsigned i; - for (i = 0; i != NE; ++i) { - Operands[0] = Chain; - for (unsigned j = 1, e = N->getNumOperands(); j != e; ++j) { - SDValue Operand = N->getOperand(j); - EVT OperandVT = Operand.getValueType(); - if (OperandVT.isVector()) { - EVT OperandEltVT = OperandVT.getVectorElementType(); - Operands[j] = - DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, OperandEltVT, Operand, - DAG.getConstant(i, dl, TLI.getVectorIdxTy( - DAG.getDataLayout()))); - } else { - Operands[j] = Operand; - } - } - SDValue Scalar = DAG.getNode(N->getOpcode(), dl, ChainVTs, Operands); - Scalar.getNode()->setFlags(N->getFlags()); - - //Add in the scalar as well as its chain value to the - //result vectors. - Scalars.push_back(Scalar); - Chains.push_back(Scalar.getValue(1)); - } - - for (; i < ResNE; ++i) - Scalars.push_back(DAG.getUNDEF(EltVT)); - - // Build a new factor node to connect the chain back together. - Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Chains); - ReplaceValueWith(SDValue(N, 1), Chain); - - // Create a new BUILD_VECTOR node - EVT VecVT = EVT::getVectorVT(*DAG.getContext(), EltVT, ResNE); - return DAG.getBuildVector(VecVT, dl, Scalars); -} - void DAGTypeLegalizer::SplitVecRes_OverflowOp(SDNode *N, unsigned ResNo, SDValue &Lo, SDValue &Hi) { SDLoc dl(N); @@ -3025,7 +2968,7 @@ SDValue DAGTypeLegalizer::WidenVecRes_StrictFP(SDNode *N) { // No legal vector version so unroll the vector operation and then widen. if (NumElts == 1) - return UnrollVectorOp_StrictFP(N, WidenVT.getVectorNumElements()); + return UnrollVectorOp(N, WidenVT.getVectorNumElements()); // Since the operation can trap, apply operation on the original vector. EVT MaxVT = VT; |

