mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-14 17:28:53 +00:00
tidy up
1. remove duplicate local variable 2. add local variable with name to match comment 3. remove useless comment llvm-svn: 237715
This commit is contained in:
parent
94e9820764
commit
9888216cb2
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user