mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 16:54:48 +00:00
Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal
types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ef3d17866
commit
5257106c4d
@ -2460,23 +2460,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
|
|||||||
Results.push_back(ExpandExtractFromVectorThroughStack(SDValue(Node, 0)));
|
Results.push_back(ExpandExtractFromVectorThroughStack(SDValue(Node, 0)));
|
||||||
break;
|
break;
|
||||||
case ISD::CONCAT_VECTORS: {
|
case ISD::CONCAT_VECTORS: {
|
||||||
// Use extract/insert/build vector for now. We might try to be
|
Results.push_back(ExpandVectorBuildThroughStack(Node));
|
||||||
// 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);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ISD::SCALAR_TO_VECTOR:
|
case ISD::SCALAR_TO_VECTOR:
|
||||||
|
8
test/CodeGen/X86/2009-06-06-ConcatVectors.ll
Normal file
8
test/CodeGen/X86/2009-06-06-ConcatVectors.ll
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
; RUN: llvm-as < %s | llc
|
||||||
|
|
||||||
|
define <2 x i64> @_mm_movpi64_pi64(<1 x i64> %a, <1 x i64> %b) nounwind readnone {
|
||||||
|
entry:
|
||||||
|
%0 = shufflevector <1 x i64> %a, <1 x i64> %b, <2 x i32> <i32 0, i32 1>
|
||||||
|
ret <2 x i64> %0
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user