[flang-commits] [flang] Redo [flang][OpenMP] Implement collapse for imperfectly nested loops (PR #208528)

Caroline Newcombe via flang-commits flang-commits at lists.llvm.org
Mon Jul 13 12:51:02 PDT 2026


cenewcombe wrote:

This is fixed and ready for review. Collapsed imperfect loop nests under a `target` SPMD region could produce IR that fails the `omp.target` verifier, because the intervening-code guards do arithmetic on loop bounds that are `host_eval` block arguments (an illegal use inside the region). We now detect this case and emit a clean `not yet implemented` diagnostic instead of malformed IR, plus a regression test. 

I went with a clean TODO rather than a full fix here because doing it properly involves some implementation decisions (e.g. recomputing the bounds in-region) that I didn't want to pile into this reland PR — I'll open a separate issue to track it.

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


More information about the flang-commits mailing list