[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 14:18:45 PDT 2020


ldionne added a comment.

In D71726#1791904 <https://reviews.llvm.org/D71726#1791904>, @jfb wrote:

> This generally seems fine. Does it work on most backends? I want to make sure it doesn't fail in backends :)
>
> Also, @ldionne / @EricWF / @mclow.lists do you need this in libc++ for floating-point atomic support?


Yes, I guess we do in order to implement `fetch_add` & friends on floating point types (https://wg21.link/P0020R6).

The builtins would need to work on `float`, `double` and `long double`. The code seems to suggest it does, however the tests only check for `float`. Does this support `__atomic_fetch_{add,sub}` on `double` and `long double`?


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

https://reviews.llvm.org/D71726





More information about the cfe-commits mailing list