summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-09-05 08:13:35 +0000
committerDuncan Sands <baldrick@free.fr>2008-09-05 08:13:35 +0000
commit4d50e984bb503fdadf791c6afeda0b958125d9a3 (patch)
tree75650ac407c6365e8f15b849cc3e9ba012db19d7 /llvm/lib
parent7de5e3b11128d5a0555aafdc9819f8736702effa (diff)
downloadbcm5719-llvm-4d50e984bb503fdadf791c6afeda0b958125d9a3.tar.gz
bcm5719-llvm-4d50e984bb503fdadf791c6afeda0b958125d9a3.zip
"Fix" PR2762. The testcase now crashes codegen
elsewhere due to a missing pattern for v2f64 = sint_to_fp v2i32. That is PR2687. llvm-svn: 55828
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 6bfc6c6bb6f..c365865c2fd 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -524,7 +524,25 @@ void DAGTypeLegalizer::SplitVecRes_UnaryOp(SDNode *N, SDValue &Lo,
MVT LoVT, HiVT;
GetSplitDestVTs(N->getValueType(0), LoVT, HiVT);
- GetSplitVector(N->getOperand(0), Lo, Hi);
+ // Split the input.
+ MVT InVT = N->getOperand(0).getValueType();
+ switch (getTypeAction(InVT)) {
+ default: assert(0 && "Unexpected type action!");
+ case Legal: {
+ assert(LoVT == HiVT && "Legal non-power-of-two vector type?");
+ MVT InNVT = MVT::getVectorVT(InVT.getVectorElementType(),
+ LoVT.getVectorNumElements());
+ Lo = DAG.getNode(ISD::EXTRACT_SUBVECTOR, InNVT, N->getOperand(0),
+ DAG.getIntPtrConstant(0));
+ Hi = DAG.getNode(ISD::EXTRACT_SUBVECTOR, InNVT, N->getOperand(0),
+ DAG.getIntPtrConstant(InNVT.getVectorNumElements()));
+ break;
+ }
+ case SplitVector:
+ GetSplitVector(N->getOperand(0), Lo, Hi);
+ break;
+ }
+
Lo = DAG.getNode(N->getOpcode(), LoVT, Lo);
Hi = DAG.getNode(N->getOpcode(), HiVT, Hi);
}
OpenPOWER on IntegriCloud