[flang-commits] [mlir] [flang] [OpenMP][Flang] Add "IsolatedFromAbove" trait to omp.target (PR #67164)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Wed Nov 1 09:27:29 PDT 2023


TIFitis wrote:

@kiranchandramohan @jeanPerier Sorry to bother both of you, but I've run into an issue with this patch.

When the target region contains a do while loop like in the example below, the loops is absent entirely from the generated FIR/HLFIR.

This happens for the target data directive as well for which we added a similar custom region body generator some time back.

Any idea why?

```
program main
   integer :: x(10) = (/0, 0, 0, 0, 0, 0, 0, 0, 0, 0/)
   integer :: i = 1
   integer :: j = 11
   !$omp target map(tofrom:x, i, j)
      do while (i <= j)
         x(i) = i;
         i = i + 1
      end do
   !$omp end target
end program main
```

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


More information about the flang-commits mailing list