Index: lib/Analysis/BasicAliasAnalysis.cpp =================================================================== --- lib/Analysis/BasicAliasAnalysis.cpp +++ lib/Analysis/BasicAliasAnalysis.cpp @@ -91,10 +91,7 @@ // The load case works because isNonEscapingLocalObject considers all // stores to be escapes (it passes true for the StoreCaptures argument // to PointerMayBeCaptured). - if (isa(V)) - return true; - - return false; + return isa(V); } /// getObjectSize - Return the size of the object specified by V, or @@ -797,10 +794,7 @@ static bool isAssumeIntrinsic(ImmutableCallSite CS) { const IntrinsicInst *II = dyn_cast(CS.getInstruction()); - if (II && II->getIntrinsicID() == Intrinsic::assume) - return true; - - return false; + return II && II->getIntrinsicID() == Intrinsic::assume; } bool BasicAliasAnalysis::doInitialization(Module &M) { Index: lib/Analysis/CaptureTracking.cpp =================================================================== --- lib/Analysis/CaptureTracking.cpp +++ lib/Analysis/CaptureTracking.cpp @@ -77,10 +77,8 @@ // If the value is defined in the same basic block as use and BeforeHere, // there is no need to explore the use if BeforeHere dominates use. // Check whether there is a path from I to BeforeHere. - if (BeforeHere != I && DT->dominates(BeforeHere, I) && - !isPotentiallyReachable(I, BeforeHere, DT)) - return false; - return true; + return !(BeforeHere != I && DT->dominates(BeforeHere, I) && + !isPotentiallyReachable(I, BeforeHere, DT)); } bool captured(const Use *U) override { Index: lib/Analysis/CostModel.cpp =================================================================== --- lib/Analysis/CostModel.cpp +++ lib/Analysis/CostModel.cpp @@ -152,10 +152,7 @@ Mask[i] = val; SmallVector ActualMask = SI->getShuffleMask(); - if (Mask != ActualMask) - return false; - - return true; + return !(Mask != ActualMask); } static bool matchPairwiseReductionAtLevel(const BinaryOperator *BinOp, Index: lib/Analysis/InstructionSimplify.cpp =================================================================== --- lib/Analysis/InstructionSimplify.cpp +++ lib/Analysis/InstructionSimplify.cpp @@ -123,11 +123,8 @@ // Otherwise, if the instruction is in the entry block, and is not an invoke, // then it obviously dominates all phi nodes. - if (I->getParent() == &I->getParent()->getParent()->getEntryBlock() && - !isa(I)) - return true; - - return false; + return I->getParent() == &I->getParent()->getParent()->getEntryBlock() && + !isa(I); } /// ExpandBinOp - Simplify "A op (B op' C)" by distributing op over op', turning Index: lib/Analysis/LoopAccessAnalysis.cpp =================================================================== --- lib/Analysis/LoopAccessAnalysis.cpp +++ lib/Analysis/LoopAccessAnalysis.cpp @@ -146,11 +146,8 @@ // If PtrPartition is set omit checks between pointers of the same partition. // Partition number -1 means that the pointer is used in multiple partitions. // In this case we can't omit the check. - if (PtrPartition && (*PtrPartition)[I] != -1 && - (*PtrPartition)[I] == (*PtrPartition)[J]) - return false; - - return true; + return !(PtrPartition && (*PtrPartition)[I] != -1 && + (*PtrPartition)[I] == (*PtrPartition)[J]); } void LoopAccessInfo::RuntimePointerCheck::print( Index: lib/Analysis/TargetLibraryInfo.cpp =================================================================== --- lib/Analysis/TargetLibraryInfo.cpp +++ lib/Analysis/TargetLibraryInfo.cpp @@ -42,10 +42,7 @@ if (T.isMacOSX() && T.isMacOSXVersionLT(10, 9)) return false; - if (T.isiOS() && T.isOSVersionLT(7, 0)) - return false; - - return true; + return !(T.isiOS() && T.isOSVersionLT(7, 0)); } /// initialize - Initialize the set of available library functions based on the Index: lib/Analysis/ValueTracking.cpp =================================================================== --- lib/Analysis/ValueTracking.cpp +++ lib/Analysis/ValueTracking.cpp @@ -1591,9 +1591,7 @@ isKnownToBeAPowerOfTwo(Y, /*OrZero*/ true, Depth, Q, DL)) return true; // X & (-X) is always a power of two or zero. - if (match(X, m_Neg(m_Specific(Y))) || match(Y, m_Neg(m_Specific(X)))) - return true; - return false; + return match(X, m_Neg(m_Specific(Y))) || match(Y, m_Neg(m_Specific(X))); } // Adding a power-of-two or zero to the same power-of-two or zero yields @@ -3176,10 +3174,7 @@ return true; // operator new never returns null. - if (isOperatorNewLikeFn(V, TLI, /*LookThroughBitCast=*/true)) - return true; - - return false; + return isOperatorNewLikeFn(V, TLI, /*LookThroughBitCast=*/true); } static bool isKnownNonNullFromDominatingCondition(const Value *V,