From: Sanjay Patel Date: Thu, 19 Apr 2018 17:56:36 +0000 (+0000) Subject: [Reassociate] fix formatting; NFC X-Git-Tag: llvmorg-7.0.0-rc1~7893 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a201787fd700b4eaaf951d381a158d093031e71a;p=platform%2Fupstream%2Fllvm.git [Reassociate] fix formatting; NFC llvm-svn: 330348 --- diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index 9871536..0317025 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -200,14 +200,13 @@ unsigned ReassociatePass::getRank(Value *V) { // for PHI nodes, we cannot have infinite recursion here, because there // cannot be loops in the value graph that do not go through PHI nodes. unsigned Rank = 0, MaxRank = RankMap[I->getParent()]; - for (unsigned i = 0, e = I->getNumOperands(); - i != e && Rank != MaxRank; ++i) + for (unsigned i = 0, e = I->getNumOperands(); i != e && Rank != MaxRank; ++i) Rank = std::max(Rank, getRank(I->getOperand(i))); // If this is a not or neg instruction, do not count it for rank. This // assures us that X and ~X will have the same rank. - if (!BinaryOperator::isNot(I) && !BinaryOperator::isNeg(I) && - !BinaryOperator::isFNeg(I)) + if (!BinaryOperator::isNot(I) && !BinaryOperator::isNeg(I) && + !BinaryOperator::isFNeg(I)) ++Rank; DEBUG(dbgs() << "Calculated Rank[" << V->getName() << "] = " << Rank << "\n");