summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-06 07:08:26 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-06 07:08:26 +0000
commitc61e357aa684dd0e8ed5d2e28ec3de08e772fb46 (patch)
tree00b01121260e13362bbd261b2629d273592fad79 /llvm/lib/CodeGen/SelectionDAG
parentaee3f62b75dd3ba164f56a71876a141fe0f06cf6 (diff)
downloadbcm5719-llvm-c61e357aa684dd0e8ed5d2e28ec3de08e772fb46.tar.gz
bcm5719-llvm-c61e357aa684dd0e8ed5d2e28ec3de08e772fb46.zip
Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal
types. llvm-svn: 72993
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 7c460ed013c..5ae183e2fa0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2460,23 +2460,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
Results.push_back(ExpandExtractFromVectorThroughStack(SDValue(Node, 0)));
break;
case ISD::CONCAT_VECTORS: {
- // Use extract/insert/build vector for now. We might try to be
- // more clever later.
- SmallVector<SDValue, 8> Ops;
- unsigned NumOperands = Node->getNumOperands();
- for (unsigned i=0; i < NumOperands; ++i) {
- SDValue SubOp = Node->getOperand(i);
- MVT VVT = SubOp.getNode()->getValueType(0);
- MVT EltVT = VVT.getVectorElementType();
- unsigned NumSubElem = VVT.getVectorNumElements();
- for (unsigned j=0; j < NumSubElem; ++j) {
- Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, EltVT, SubOp,
- DAG.getIntPtrConstant(j)));
- }
- }
- Tmp1 = DAG.getNode(ISD::BUILD_VECTOR, dl, Node->getValueType(0),
- &Ops[0], Ops.size());
- Results.push_back(Tmp1);
+ Results.push_back(ExpandVectorBuildThroughStack(Node));
break;
}
case ISD::SCALAR_TO_VECTOR:
OpenPOWER on IntegriCloud