[clang] [llvm] [mlir] [openmp] [Clang][OpenMP] Canonicalize Intra-tiles in Loop Tiling (PR #191114)
Amit Tiwari via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 06:57:01 PDT 2026
loopacino wrote:
> The following should either be compile correctly or rejected as not supported:
>
> ```
> $ cat seen.c
> #include <stdio.h>
>
> int seen[6] = {0};
> int main() {
> #pragma omp tile sizes(3, 5)
> #pragma omp tile sizes(2)
> for (int i = 0; i < 6; ++i)
> ++seen[i];
>
> for (int i = 0; i < 6; ++i)
> printf("seen[%d]=%d\n", i, seen[i]);;
>
> return 0 ;
> } $ bin/clang seen.c -O3 -fopenmp -o seen && ./seen
> seen[0]=3
> seen[1]=3
> seen[2]=0
> seen[3]=0
> seen[4]=0
> seen[5]=0
> ```
>
> Consider an entry to [clang/docs/ReleaseNotes.md](https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.md)
It is now rejected as a compiler error. The msg matches the stacked-collapse case (which is also not supported; so reused the same diag). Added a test like seen.c. Also, if the outer directive only uses the floor loop, we still accept cases like 1) unroll over till, 2) tile size(x) over tile size(y).
https://github.com/llvm/llvm-project/pull/191114
More information about the cfe-commits
mailing list