[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 8 13:32:27 PDT 2018
rjmccall added inline comments.
================
Comment at: docs/LanguageExtensions.rst:1998
+``__ATOMIC_CONSUME``, ``__ATOMIC_ACQUIRE``, ``__ATOMIC_RELEASE``,
+``__ATOMIC_ACQ_REL``, or ``__ATOMIC_SEQ_CST`` following C++11 memory model semantics.
+
----------------
Thank you for adding this documentation. Please do clarify what the memory ordering semantics actually are when the atomic object does not need to be updated, though, and verify that target code generation actually obeys that ordering. For example, if the memory ordering makes this a release operation, `__atomic_fetch_min` must always store the result back to the atomic object, even if the new value was actually greater than the stored value; I believe that would not be required with a relaxed operation.
Repository:
rC Clang
https://reviews.llvm.org/D46386
More information about the cfe-commits
mailing list