[OpenMP] Fix atomic entries for captured logical operation
Added missing code for the captured atomic operation.
Differential Revision: https://reviews.llvm.org/D94848
GitOrigin-RevId: 2d911f7c72f9174a34f74abe2909f992b03caaf1
diff --git a/runtime/src/kmp_atomic.cpp b/runtime/src/kmp_atomic.cpp
index 4d60b55..a9d5257 100644
--- a/runtime/src/kmp_atomic.cpp
+++ b/runtime/src/kmp_atomic.cpp
@@ -2536,8 +2536,11 @@
\
if (flag) { \
new_value OP rhs; \
- } else \
+ (*lhs) = new_value; \
+ } else { \
new_value = (*lhs); \
+ (*lhs) OP rhs; \
+ } \
\
__kmp_release_atomic_lock(&ATOMIC_LOCK##LCK_ID, gtid);