[clang] [OpenMP] Tile/stripe followed by reverse (PR #222401)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 11:01:40 PDT 2026


zahiraam wrote:

> Thanks for working on this! I think a similar error occurs when OMP FOR COLLAPSE(2) is followed by REVERSE. It would be good to add a test case covering this as well:
> 
> ```
> `int jlower  = 11;
> int jupper  = 18;
> int jstride = 2;
> 
> int ilower  = 12;
> int iupper  = 20;
> int istride = 3;
> 
> int main () {
>   #pragma omp for collapse(2)
>   #pragma omp reverse
>   for (int jjj = jlower; jjj < jupper; jjj += jstride) {
>     for (int iii = ilower; iii < iupper; iii += istride) {
>       printf("tid=%d   jjj=%d   iii = %d\n", omp_get_thread_num(), jjj, iii);
>     }
>   }
> 
>   return 0;
> }`
> ```

Done.

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


More information about the cfe-commits mailing list