Avoid creating MERGE_VALUES nodes for single values.
authorDan Gohman <gohman@apple.com>
Mon, 14 Apr 2008 18:43:25 +0000 (18:43 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 14 Apr 2008 18:43:25 +0000 (18:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49676 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index a0f869768093659d2ca7b01919dfc24549e105f4..1e626677f02062efede7ab124d112f0909363a69 100644 (file)
@@ -1848,7 +1848,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
   unsigned OpOpcode = Operand.Val->getOpcode();
   switch (Opcode) {
   case ISD::TokenFactor:
-    return Operand;         // Factor of one node?  No factor.
+  case ISD::MERGE_VALUES:
+    return Operand;         // Factor or merge of one node?  No need.
   case ISD::FP_ROUND: assert(0 && "Invalid method to make FP_ROUND node");
   case ISD::FP_EXTEND:
     assert(MVT::isFloatingPoint(VT) &&