diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp @@ -449,8 +449,9 @@ IsNumThreadsFromUser) { // Enough parallelism for teams and threads. TripCountNumBlocks = ((LoopTripCount - 1) / NumThreads) + 1; - assert(TripCountNumBlocks >= DefaultNumBlocks && - "Expected sufficient outer parallelism."); + assert(LoopTripCount < DefaultNumBlocks * NumThreads || + TripCountNumBlocks >= DefaultNumBlocks && + "Expected sufficient outer parallelism."); } else if (LoopTripCount >= DefaultNumBlocks * MinThreads) { // Enough parallelism for teams, limit threads.