aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-13 17:59:25 +0000
committerChris Lattner <sabre@nondot.org>2005-01-13 17:59:25 +0000
commita385e9b20fa7d37d3842ce15afd412f617d83a27 (patch)
treec3c64408d01d88d4946636c5a6602e5f2572eabf /lib/CodeGen
parent282c5cae89986a5722ef59f6787108bdd668289d (diff)
Legalize new node, add assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 64c686efc6..58f98894ef 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -295,6 +295,18 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
}
break;
}
+ case ISD::TokenFactor: {
+ std::vector<SDOperand> Ops;
+ bool Changed = false;
+ for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) {
+ Ops.push_back(LegalizeOp(Node->getOperand(i))); // Legalize the operands
+ Changed |= Ops[i] != Node->getOperand(i);
+ }
+ if (Changed)
+ Result = DAG.getNode(ISD::TokenFactor, MVT::Other, Ops);
+ break;
+ }
+
case ISD::ADJCALLSTACKDOWN:
case ISD::ADJCALLSTACKUP:
Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
@@ -662,6 +674,10 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
Result = DAG.getNode(Node->getOpcode(), Node->getValueType(0), Tmp1);
break;
case Expand:
+ assert(Node->getOpcode() != ISD::SINT_TO_FP &&
+ Node->getOpcode() != ISD::UINT_TO_FP &&
+ "Cannot lower Xint_to_fp to a call yet!");
+
// In the expand case, we must be dealing with a truncate, because
// otherwise the result would be larger than the source.
assert(Node->getOpcode() == ISD::TRUNCATE &&