[clang] builtin __cxx_atomic_fetch_add
should support all floating point types
#68602
Labels
bug
Indicates an unexpected problem or unintended behavior
clang:headers
Headers provided by Clang, e.g. for intrinsics
This issues came up in implementing P0020R6 Floating Point Atomic for libc++
#67799
Basically we are trying to use
__cxx_atomic_fetch_add
for implementing atomic RMW operations. However, this function would error on some platforms forlong double
if the representation is x87 fp80 format. On the library (libc++) side, there is no way for us to tell if the function__cxx_atomic_fetch_add
is going to error on the current platform or not.The builtin should handle this properly: generates FADD IR for platforms that support it, and fallback to the compare-exchange loop on the platforms that don't
The text was updated successfully, but these errors were encountered: