[llvm-commits] [llvm] r52604 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Dan Gohman gohman at apple.com
Sat Jun 21 15:06:07 PDT 2008


Author: djg
Date: Sat Jun 21 17:06:07 2008
New Revision: 52604

URL: http://llvm.org/viewvc/llvm-project?rev=52604&view=rev
Log:
Simplify some getNode calls.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=52604&r1=52603&r2=52604&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Jun 21 17:06:07 2008
@@ -1058,8 +1058,7 @@
   
   // canonicalize constant to RHS.
   if (N0C && !N1C) {
-    SDOperand Ops[] = { N1, N0 };
-    return DAG.getNode(ISD::ADDC, N->getVTList(), Ops, 2);
+    return DAG.getNode(ISD::ADDC, N->getVTList(), N1, N0);
   }
   
   // fold (addc x, 0) -> x + no carry out
@@ -1095,14 +1094,12 @@
   
   // canonicalize constant to RHS
   if (N0C && !N1C) {
-    SDOperand Ops[] = { N1, N0, CarryIn };
-    return DAG.getNode(ISD::ADDE, N->getVTList(), Ops, 3);
+    return DAG.getNode(ISD::ADDE, N->getVTList(), N1, N0, CarryIn);
   }
   
   // fold (adde x, y, false) -> (addc x, y)
   if (CarryIn.getOpcode() == ISD::CARRY_FALSE) {
-    SDOperand Ops[] = { N1, N0 };
-    return DAG.getNode(ISD::ADDC, N->getVTList(), Ops, 2);
+    return DAG.getNode(ISD::ADDC, N->getVTList(), N1, N0);
   }
   
   return SDOperand();





More information about the llvm-commits mailing list