[Mlir-commits] [mlir] [OpenMP] Enable simd in non-reduction composite constructs (PR #146097)
Kajetan Puchalski
llvmlistbot at llvm.org
Fri Jun 27 08:57:45 PDT 2025
mrkajetanp wrote:
Question for reviewers who have worked on this before - the current behaviour is fairly inconsistent, that is to say, using "simd reduction" on its own results in a crash because it's not implemented, whereas using "simd reduction" as part of a composite construct simply ignores the simd. Is it desirable to keep this behaviour? For instance, the following program will crash:
```
integer :: sum
sum = 0
!$omp simd reduction(+:sum)
do i=1, 1000
sum = sum + 1
end do
```
While this one will only emit a warning.
```
integer :: sum
sum = 0
!$omp do simd reduction(+:sum)
do i=1, 1000
sum = sum + 1
end do
```
There are several tests that rely on this, which is why I kept the current warning for composite constructs with reduction.
Additionally, if someone knows of any scenarios which I've overlooked that this might break for, please point them out. I was expecting something else to require fixing in order to do this, but I've not found anything that breaks so far.
https://github.com/llvm/llvm-project/pull/146097
More information about the Mlir-commits
mailing list