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

Caroline Newcombe via flang-commits flang-commits at lists.llvm.org
Wed Jun 24 10:48:53 PDT 2026


cenewcombe wrote:

> There's a crash if there is a collapsed nest containing a loop-transforming tile construct. I think you need a not yet implemented message to catch this. Reproducer (from codex):

Fixed. The collapse descent now uses a non-asserting helper (tryGetNestedDoConstruct) and emits a "not yet implemented" TODO when COLLAPSE counts loops produced by a transforming construct (e.g. TILE). The asserting getNestedDoConstruct wrapper is retained for the call sites that legitimately require a DO loop. I added a lit test (collapse-loop-transform.f90) to cover the new diagnostic.



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


More information about the flang-commits mailing list