[Openmp-commits] [PATCH] D135036: [OpenMP] Introduce more atomic operations into the runtime

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Oct 3 14:16:44 PDT 2022


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/DeviceRTL/src/Synchronization.cpp:67
+    if (Val >= 0)                                                              \
+      return atomicMin((SINT_TY *)Address, utils::convertViaPun<SINT_TY>(Val), \
+                       Ordering);                                              \
----------------
tianshilei1992 wrote:
> This doesn't look right. The integer value after type punning doesn't conform with the same arithmetic as the original floating-point value. Actually we already have `atomicrmw fmax/fmin` in LLVM.
and we should also have the corresponding compiler builtins.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135036



More information about the Openmp-commits mailing list