diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp index f776cdeecac23..92f6289087e1e 100644 --- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp @@ -3394,9 +3394,10 @@ OpenMPIRBuilder::createOrderedDepend(const LocationDescription &Loc, InsertPointTy AllocaIP, unsigned NumLoops, ArrayRef StoreValues, const Twine &Name, bool IsDependSource) { - for (const llvm::Value *SV : StoreValues) - assert(SV->getType()->isIntegerTy(64) && - "OpenMP runtime requires depend vec with i64 type"); + assert( + llvm::all_of(StoreValues, + [](Value *SV) { return SV->getType()->isIntegerTy(64); }) && + "OpenMP runtime requires depend vec with i64 type"); if (!updateToLocation(Loc)) return Loc.IP;