llvm-project
a651871a - [flang] Keep a loop unstructured when its END DO is branched to from outside (#227597)

Commit
9 days ago
[flang] Keep a loop unstructured when its END DO is branched to from outside (#227597) A loop whose body branching is self-contained is lowered structurally, with the body folded into a region. Its END DO is not part of that body: it becomes the structured loop's terminator rather than a block of its own. A branch from outside the loop targeting a label on the END DO therefore had nothing to land on, and lowering crashed. Such a loop no longer qualifies for that form. A branch from within the body is unaffected: it is CYCLE-like and lands on the boundary the structured form already provides. Ran against the llvm-test-suite and the reported failure in https://lab.llvm.org/buildbot/#/builders/198/builds/15502 and all green.
Author
Parents
Loading