From 197685c6d8977135c227bd62c38f34106809b9d2 Mon Sep 17 00:00:00 2001 From: Amaury Sechet Date: Wed, 10 May 2017 17:58:28 +0000 Subject: Small refactoring in DAGCombine. NFC llvm-svn: 302699 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1da8fe76263..28354c1f457 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -2131,17 +2131,17 @@ SDValue DAGCombiner::visitADDCARRY(SDNode *N) { SDValue N0 = N->getOperand(0); SDValue N1 = N->getOperand(1); SDValue CarryIn = N->getOperand(2); + SDLoc DL(N); // canonicalize constant to RHS ConstantSDNode *N0C = dyn_cast(N0); ConstantSDNode *N1C = dyn_cast(N1); if (N0C && !N1C) - return DAG.getNode(ISD::ADDCARRY, SDLoc(N), N->getVTList(), - N1, N0, CarryIn); + return DAG.getNode(ISD::ADDCARRY, DL, N->getVTList(), N1, N0, CarryIn); // fold (addcarry x, y, false) -> (uaddo x, y) if (isNullConstant(CarryIn)) - return DAG.getNode(ISD::UADDO, SDLoc(N), N->getVTList(), N0, N1); + return DAG.getNode(ISD::UADDO, DL, N->getVTList(), N0, N1); if (SDValue Combined = visitADDCARRYLike(N0, N1, CarryIn, N)) return Combined; -- cgit v1.2.3