mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
use range-based for loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
92948b04c3
commit
038aeda7cf
@ -8294,11 +8294,11 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
|
||||
SDValue Reciprocal = DAG.getNode(ISD::FDIV, DL, VT, FPOne, N1);
|
||||
|
||||
// Dividend / Divisor -> Dividend * Reciprocal
|
||||
for (auto I = Users.begin(), E = Users.end(); I != E; ++I) {
|
||||
if ((*I)->getOperand(0) != FPOne) {
|
||||
SDValue NewNode = DAG.getNode(ISD::FMUL, SDLoc(*I), VT,
|
||||
(*I)->getOperand(0), Reciprocal);
|
||||
DAG.ReplaceAllUsesWith(*I, NewNode.getNode());
|
||||
for (auto &U : Users) {
|
||||
if (U->getOperand(0) != FPOne) {
|
||||
SDValue NewNode = DAG.getNode(ISD::FMUL, SDLoc(U), VT,
|
||||
U->getOperand(0), Reciprocal);
|
||||
DAG.ReplaceAllUsesWith(U, NewNode.getNode());
|
||||
}
|
||||
}
|
||||
return SDValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user