//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Chris Lattner and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
ExpandResult(N, i);
else if (MVT::getVectorNumElements(ResultVT) == 1)
ScalarizeResult(N, i); // Scalarize the single-element vector.
- else // Split the vector in half.
- assert(0 && "Vector splitting not implemented");
+ else
+ SplitResult(N, i); // Split the vector in half.
goto NodeDone;
} else {
assert(Action == Legal && "Unknown action!");
// Scalarize the single-element vector.
NeedsRevisit = ScalarizeOperand(N, i);
} else {
- // Split the vector in half.
- assert(0 && "Vector splitting not implemented");
+ NeedsRevisit = SplitOperand(N, i); // Split the vector in half.
}
break;
} else {
Hi = Entry.second;
}
-void DAGTypeLegalizer::SetExpandedOp(SDOperand Op, SDOperand Lo,
- SDOperand Hi) {
+void DAGTypeLegalizer::SetExpandedOp(SDOperand Op, SDOperand Lo, SDOperand Hi) {
// Remember that this is the result of the node.
std::pair<SDOperand, SDOperand> &Entry = ExpandedNodes[Op];
assert(Entry.first.Val == 0 && "Node already expanded");
MarkNewNodes(Hi.Val);
}
+void DAGTypeLegalizer::GetSplitOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi) {
+ std::pair<SDOperand, SDOperand> &Entry = SplitNodes[Op];
+ RemapNode(Entry.first);
+ RemapNode(Entry.second);
+ assert(Entry.first.Val && "Operand isn't split");
+ Lo = Entry.first;
+ Hi = Entry.second;
+}
+
+void DAGTypeLegalizer::SetSplitOp(SDOperand Op, SDOperand Lo, SDOperand Hi) {
+ // Remember that this is the result of the node.
+ std::pair<SDOperand, SDOperand> &Entry = SplitNodes[Op];
+ assert(Entry.first.Val == 0 && "Node already split");
+ Entry.first = Lo;
+ Entry.second = Hi;
+
+ // Lo/Hi may have been newly allocated, if so, add nodeid's as relevant.
+ if (Lo.Val->getNodeId() == NewNode)
+ MarkNewNodes(Lo.Val);
+ if (Hi.Val->getNodeId() == NewNode)
+ MarkNewNodes(Hi.Val);
+}
+
+
SDOperand DAGTypeLegalizer::CreateStackStoreLoad(SDOperand Op,
MVT::ValueType DestVT) {
// Create the stack frame object.