jfb added a comment. In D71726#2047566 <https://reviews.llvm.org/D71726#2047566>, @ldionne wrote:
> 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`? libc++ could implement `atomic<float>` using a cmpxchg loop with `bit_cast` and the FP instruction in most cases, and only use these builtins if available. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71726/new/ https://reviews.llvm.org/D71726 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits