Index: lib/IR/ConstantFold.cpp =================================================================== --- lib/IR/ConstantFold.cpp +++ lib/IR/ConstantFold.cpp @@ -2020,11 +2020,8 @@ // A negative index or an index past the end of our sequential type is // considered out-of-range. int64_t IndexVal = CI->getSExtValue(); - if (IndexVal < 0 || (NumElements > 0 && (uint64_t)IndexVal >= NumElements)) - return false; - - // Otherwise, it is in-range. - return true; + return !(IndexVal < 0 || + (NumElements > 0 && (uint64_t)IndexVal >= NumElements)); } template Index: lib/IR/InlineAsm.cpp =================================================================== --- lib/IR/InlineAsm.cpp +++ lib/IR/InlineAsm.cpp @@ -288,7 +288,6 @@ break; } - if (Ty->getNumParams() != NumInputs) return false; - return true; + return Ty->getNumParams() == NumInputs; } Index: lib/IR/Instructions.cpp =================================================================== --- lib/IR/Instructions.cpp +++ lib/IR/Instructions.cpp @@ -1372,9 +1372,7 @@ bool ExtractElementInst::isValidOperands(const Value *Val, const Value *Index) { - if (!Val->getType()->isVectorTy() || !Index->getType()->isIntegerTy()) - return false; - return true; + return Val->getType()->isVectorTy() && Index->getType()->isIntegerTy(); } @@ -2602,10 +2600,7 @@ if (SrcBits != DestBits) return false; - if (DestTy->isX86_MMXTy() || SrcTy->isX86_MMXTy()) - return false; - - return true; + return !DestTy->isX86_MMXTy() && !SrcTy->isX86_MMXTy(); } bool CastInst::isBitOrNoopPointerCastable(Type *SrcTy, Type *DestTy, Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -1510,12 +1510,9 @@ unsigned LastSlot = Attrs.getNumSlots() - 1; unsigned LastIndex = Attrs.getSlotIndex(LastSlot); - if (LastIndex <= Params - || (LastIndex == AttributeSet::FunctionIndex - && (LastSlot == 0 || Attrs.getSlotIndex(LastSlot - 1) <= Params))) - return true; - - return false; + return LastIndex <= Params || + (LastIndex == AttributeSet::FunctionIndex && + (LastSlot == 0 || Attrs.getSlotIndex(LastSlot - 1) <= Params)); } /// \brief Verify that statepoint intrinsic is well formed.