[llvm] [mlir] [mlir][OpenMP] Add __atomic_store to AtomicInfo (PR #121055)
Tom Eccles via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 06:28:23 PST 2025
tblah wrote:
> I have made a branch off this PR here: https://github.com/NimishMishra/f18-llvm-project/commits/atomic_allocated_type_size/. Could you check if you are happy with it? I can submit it for review as a separate PR then, since the issue is with all of atomic read/write/update.
Thanks for looking into this. I think we need to perform an actual cast at the fortran level. For example this segfaults when built with omp because the write of `x` overflows `v`:
```
program repo
complex(8) :: x = 0
complex v
integer :: i = 1
!$omp parallel
!$omp atomic read
v = x
!$omp end parallel
print *,"ok"
end program
```
Building without openmp there is a `fir.convert` to change `x` into a `complex(4)` before performing the assignment.
https://github.com/llvm/llvm-project/pull/121055
More information about the llvm-commits
mailing list