diff --git a/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp b/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp index 367c2966f10e..afb0704f2642 100644 --- a/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp +++ b/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp @@ -93,6 +93,7 @@ void __kmpc_parallel_51(IdentTy *ident, int32_t, int32_t if_expr, uint32_t NumThreads = determineNumberOfThreads(num_threads); if (mapping::isSPMDMode()) { + synchronize::threads(); { state::ValueRAII ParallelTeamSizeRAII(state::ParallelTeamSize, NumThreads, 1u, TId == 0);