[flang-commits] [flang] [flang][OpenMP]Add parsing and semantics support for ATOMIC COMPARE (PR #117032)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Sun Nov 24 23:37:06 PST 2024
================
@@ -121,6 +122,30 @@ program main
i = j
!$omp end atomic
+!COMPARE
+!$omp atomic compare
+ r = i .eq. j
+!$omp atomic seq_cst compare
+ r = i .eq. j
+!$omp atomic compare seq_cst
+ r = i .eq. j
+!$omp atomic release compare
+ r = i .eq. j
+!$omp atomic compare release
+ r = i .eq. j
+!$omp atomic acq_rel compare
+ r = i .eq. j
+!$omp atomic compare acq_rel
+ r = i .eq. j
+!$omp atomic acquire compare
+ r = i .eq. j
+!$omp atomic compare acquire
+ r = i .eq. j
+!$omp atomic relaxed compare
+ r = i .eq. j
+!$omp atomic compare relaxed
+ r = i .eq. j
----------------
kiranchandramohan wrote:
The 5.1 standard specifies the format as follows. You will have to update the tests.
```
if (x == e) then
x = d
end if
if (x == e) x = d
```
In 5.2 standard these are described as `conditional-update-atomic`.
https://github.com/llvm/llvm-project/pull/117032
More information about the flang-commits
mailing list