llvm-project/libcxx/test
Jordan Rupprecht 6d33362daf [libcxx][atomic] Fix failure mapping in compare_exchange_{strong,weak}.
https://eel.is/c++draft/atomics.types.operations#23 says: ... the value of failure is order except that a value of `memory_order::acq_rel` shall be replaced by the value `memory_order::acquire` and a value of `memory_order::release` shall be replaced by the value `memory_order::relaxed`.

This failure mapping is only handled for `_LIBCPP_HAS_GCC_ATOMIC_IMP`. We are seeing bad code generation for `compare_exchange_strong(cmp, 1, std::memory_order_acq_rel)` when using libc++ in place of libstdc++: https://godbolt.org/z/v3onrrq4G.

This was caught by tsan tests after D99434, `[TSAN] Honor failure memory orders in AtomicCAS`, but appears to be an issue in non-tsan code.

Reviewed By: ldionne, dvyukov

Differential Revision: https://reviews.llvm.org/D103846
2021-06-15 07:55:23 -07:00
..
configs [libc++] Enable tests for the experimental library by default 2021-06-02 18:39:27 -04:00
libcxx [libc++] Add a CI configuration for the modular build 2021-06-08 13:32:08 -04:00
std [libcxx][atomic] Fix failure mapping in compare_exchange_{strong,weak}. 2021-06-15 07:55:23 -07:00
support [libc++] NFC: More refactoring in the prev/next/advance tests per review comments 2021-06-14 08:42:44 -04:00
CMakeLists.txt [libc++] Switch a few CI jobs to the minimal Lit configuration 2021-05-20 10:46:59 -04:00
lit.cfg.py [libc++] Allow specifying custom Lit config files 2020-06-18 10:06:04 -04:00