[clang] [llvm] [openmp] [Clang][OpenMP] Add `#pragma omp flatten` loop directive + `depth` clause (PR #206977)
Amit Tiwari via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 25 01:08:44 PDT 2026
loopacino wrote:
> Will it handle this test:
>
> ```
> #pragma omp flatten
> for (int i = 0; i < -1; ++i) // also: runtime n,m both negative
> for (int j = 0; j < -1; ++j)
> body(i, j); // must execute 0 times; flatten executes it once
> ```
>
> ?
clamped each trip count to the range max(0,N) before multiplying so -1 is 0 and hence _now_ runs zero times.
https://github.com/llvm/llvm-project/pull/206977
More information about the cfe-commits
mailing list