From 0a4627d71f8f836558ef05c9739b560e82412687 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 23 Jun 2008 15:29:14 +0000 Subject: [PATCH] Duncan pointed out this code could be tidied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52624 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 817b62588db..c07ad27baa6 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1057,9 +1057,8 @@ SDOperand DAGCombiner::visitADDC(SDNode *N) { DAG.getNode(ISD::CARRY_FALSE, MVT::Flag)); // canonicalize constant to RHS. - if (N0C && !N1C) { + if (N0C && !N1C) return DAG.getNode(ISD::ADDC, N->getVTList(), N1, N0); - } // fold (addc x, 0) -> x + no carry out if (N1C && N1C->isNullValue()) @@ -1093,14 +1092,12 @@ SDOperand DAGCombiner::visitADDE(SDNode *N) { //MVT VT = N0.getValueType(); // canonicalize constant to RHS - if (N0C && !N1C) { + if (N0C && !N1C) return DAG.getNode(ISD::ADDE, N->getVTList(), N1, N0, CarryIn); - } // fold (adde x, y, false) -> (addc x, y) - if (CarryIn.getOpcode() == ISD::CARRY_FALSE) { + if (CarryIn.getOpcode() == ISD::CARRY_FALSE) return DAG.getNode(ISD::ADDC, N->getVTList(), N1, N0); - } return SDOperand(); } -- 2.34.1