[flang-commits] [flang] [flang] Fix crash when GoTo exits acc.loop region (PR #187613)
via flang-commits
flang-commits at lists.llvm.org
Thu Mar 19 22:30:35 PDT 2026
khaki3 wrote:
>This solution (...) isn't sufficient yet to properly reproduce the original jumps
I believe we don't support jumping from the acc loop to a parent loop more than one level above.
The spec says:
>2306 A loop associated with a loop construct that does not have a seq clause must be written to meet all of the following conditions:
>...
>- The loop trip count must be computable in constant time when entering the loop con2313 struct.
>
> (p.65 https://openacc.org/sites/default/files/inline-images/Specification/OpenACC-3.4.pdf)
Our case is sequential. If we need to keep goto inside an acc region, we can remove acc.loop. If it jumps to the outside of parallel loops, it have to create `acc.yield`.
https://github.com/llvm/llvm-project/pull/187613
More information about the flang-commits
mailing list