[Openmp-commits] [PATCH] D94848: [OpenMP] Fix atomic entries for captured logical operation

Hansang Bae via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 19 08:15:09 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2d911f7c72f9: [OpenMP] Fix atomic entries for captured logical operation (authored by hbae).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94848/new/

https://reviews.llvm.org/D94848

Files:
  openmp/runtime/src/kmp_atomic.cpp


Index: openmp/runtime/src/kmp_atomic.cpp
===================================================================
--- openmp/runtime/src/kmp_atomic.cpp
+++ openmp/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);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94848.317570.patch
Type: text/x-patch
Size: 1088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210119/7712547c/attachment.bin>


More information about the Openmp-commits mailing list