Change the interface to the type legalization method
ReplaceNodeResults: rather than returning a node which
must have the same number of results as the original
node (which means mucking around with MERGE_VALUES,
and which is also easy to get wrong since SelectionDAG
folding may mean you don't get the node you expect),
return the results in a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60348 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 3ff6645..5b230fb 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -6083,8 +6083,10 @@
   // the target lowering hooks to expand it.  Just keep the low part of the
   // expanded operation, we know that we're truncating anyway.
   if (getTypeAction(NewOutTy) == Expand) {
-    Operation = SDValue(TLI.ReplaceNodeResults(Operation.getNode(), DAG), 0);
-    assert(Operation.getNode() && "Didn't return anything");
+    SmallVector<SDValue, 2> Results;
+    TLI.ReplaceNodeResults(Operation.getNode(), Results, DAG);
+    assert(Results.size() == 1 && "Incorrect FP_TO_XINT lowering!");
+    Operation = Results[0];
   }
 
   // Truncate the result of the extended FP_TO_*INT operation to the desired