[llvm] r237715 - tidy up
Sanjay Patel
spatel at rotateright.com
Tue May 19 12:10:57 PDT 2015
Author: spatel
Date: Tue May 19 14:10:57 2015
New Revision: 237715
URL: http://llvm.org/viewvc/llvm-project?rev=237715&view=rev
Log:
tidy up
1. remove duplicate local variable
2. add local variable with name to match comment
3. remove useless comment
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=237715&r1=237714&r2=237715&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue May 19 14:10:57 2015
@@ -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());
}
}
More information about the llvm-commits
mailing list