Revert the SelectionDAG optimization that makes
[oota-llvm.git] / include / llvm / CodeGen / SelectionDAG.h
index 8b3dad223a0b64481ca71b17489eed79ad975463..dee6bc746e7ea3e1c884ee230ed61167c92e67b6 100644 (file)
@@ -379,6 +379,15 @@ public:
                       SDOperand Val, const Value* PtrVal,
                       unsigned Alignment = 0);
 
+  /// getMergeValues - Create a MERGE_VALUES node from the given types and ops.
+  /// Allowed to return something different (and simpler) if Simplify is true.
+  SDOperand getMergeValues(SDVTList VTs, SDOperandPtr Ops, unsigned NumOps,
+                           bool Simplify = true) {
+    if (Simplify && NumOps == 1)
+      return Ops[0];
+    return getNode(ISD::MERGE_VALUES, VTs, Ops, NumOps);
+  }
+
   /// getLoad - Loads are not normal binary operators: their result type is not
   /// determined by their operands, and they produce a value AND a token chain.
   ///