From 0f9fcd22b36e49b61dd0c6947d1b58e86fd22f1d Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Tue, 19 May 2015 19:10:57 +0000 Subject: [PATCH] tidy up 1. remove duplicate local variable 2. add local variable with name to match comment 3. remove useless comment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237715 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 20d78b87154..8e1dff8023e 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -8286,15 +8286,15 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) { } if (TLI.combineRepeatedFPDivisors(Users.size())) { - SDLoc DL(N); - SDValue FPOne = DAG.getConstantFP(1.0, DL, VT); // floating point 1.0 + SDValue FPOne = DAG.getConstantFP(1.0, DL, VT); SDValue Reciprocal = DAG.getNode(ISD::FDIV, DL, VT, FPOne, N1); // Dividend / Divisor -> Dividend * Reciprocal for (auto U : Users) { - if (U->getOperand(0) != FPOne) { - SDValue NewNode = DAG.getNode(ISD::FMUL, SDLoc(U), VT, - U->getOperand(0), Reciprocal); + SDValue Dividend = U->getOperand(0); + if (Dividend != FPOne) { + SDValue NewNode = DAG.getNode(ISD::FMUL, SDLoc(U), VT, Dividend, + Reciprocal); DAG.ReplaceAllUsesWith(U, NewNode.getNode()); } } -- 2.34.1