[llvm] [Offload][OpenMP][Flang] Update no-loop test (PR #205803)

Sergio Afonso via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 06:14:41 PDT 2026


skatrak wrote:

Right, here the problem is that there was an undocumented restriction of no-loop kernels that they must be `target teams distribute parallel do`, and `target parallel do` actually doesn't work in no-loop mode. The Flang frontend currently incorrectly promotes `target parallel do` to SPMD-No-Loop.

However, we do have a safety check later in the compilation flow (`createTargetLoopWorkshareCall` in OMPIRBuilder) that only sets the no-loop flag for `__kmpc_distribute_for_static_loop_*` calls in the `distribute parallel do` case. So we get regular SPMD execution even though we tag the kernel itself as no-loop.

The fix would indeed be to prevent the frontend from promoting `target parallel do` to No-Loop, but it currently doesn't cause runtime issues. I'd probably suggest merging this patch (with a TODO note) to fix the buildbot while I work on the tweak to the frontend. Let me know if that works for you @DominikAdamski.

https://github.com/llvm/llvm-project/pull/205803


More information about the llvm-commits mailing list