Index: lib/Transforms/Utils/Local.cpp =================================================================== --- lib/Transforms/Utils/Local.cpp +++ lib/Transforms/Utils/Local.cpp @@ -296,14 +296,10 @@ // We don't want debug info removed by anything this general, unless // debug info is empty. if (DbgDeclareInst *DDI = dyn_cast(I)) { - if (DDI->getAddress()) - return false; - return true; + return DDI->getAddress() == nullptr; } if (DbgValueInst *DVI = dyn_cast(I)) { - if (DVI->getValue()) - return false; - return true; + return DVI->getValue() == nullptr; } if (!I->mayHaveSideEffects()) return true; Index: lib/Transforms/Utils/SimplifyCFG.cpp =================================================================== --- lib/Transforms/Utils/SimplifyCFG.cpp +++ lib/Transforms/Utils/SimplifyCFG.cpp @@ -3660,11 +3660,8 @@ // is unreachable. DefaultResult = DefaultResults.size() == 1 ? DefaultResults.begin()->second : nullptr; - if ((!DefaultResult && - !isa(DefaultDest->getFirstNonPHIOrDbg()))) - return false; - - return true; + return !(!DefaultResult && + !isa(DefaultDest->getFirstNonPHIOrDbg())); } // Helper function that checks if it is possible to transform a switch with only Index: lib/Transforms/Utils/SimplifyIndVar.cpp =================================================================== --- lib/Transforms/Utils/SimplifyIndVar.cpp +++ lib/Transforms/Utils/SimplifyIndVar.cpp @@ -297,10 +297,7 @@ } } - if (eliminateIdentitySCEV(UseInst, IVOperand)) - return true; - - return false; + return eliminateIdentitySCEV(UseInst, IVOperand); } /// Eliminate any operation that SCEV can prove is an identity function. @@ -504,10 +501,7 @@ // Only consider affine recurrences. const SCEVAddRecExpr *AR = dyn_cast(S); - if (AR && AR->getLoop() == L) - return true; - - return false; + return AR && AR->getLoop() == L; } /// Iteratively perform simplification on a worklist of users