llvm-project/libcxx/test/std
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
..
algorithms Revert "[libcxx][gardening] Move all algorithms into their own headers." 2021-06-07 17:15:20 -07:00
atomics [libcxx][atomic] Fix failure mapping in compare_exchange_{strong,weak}. 2021-06-15 07:55:23 -07:00
concepts [libc++] Fix concepts tests with GCC 2021-05-26 11:21:55 -04:00
containers [libc++] [test] No longer rely on std::hash<T>::argument_type. 2021-06-14 10:14:42 -04:00
depr [libcxx] [test] Remove an incorrect TEST_HAS_ALIGNED_ALLOC define from test_macros.h 2021-05-31 22:13:22 +03:00
diagnostics [libc++] Move handling of the target triple to the DSL 2021-05-08 11:10:53 -04:00
experimental [libcxx][nfc] Fix the ASAN bots: update expected.pass.cpp. 2021-05-26 14:06:25 -07:00
input.output [libcxx] Fix the function name in exceptions from create_directories 2021-05-25 23:48:50 +03:00
iterators [libc++] [test] Fix some GCC 11 errors/warnings in these tests. NFCI. 2021-06-15 08:37:32 -04:00
language.support [libcxx] [test] Remove an incorrect TEST_HAS_ALIGNED_ALLOC define from test_macros.h 2021-05-31 22:13:22 +03:00
localization [libcxx] [test] Don't look for the literal spelling __mbstate_t in warnings 2021-05-31 22:13:21 +03:00
namespace [libc++] Add a libc++ configuration that does not support localization 2020-10-27 14:56:30 -04:00
numerics [libc++] Fix result-type and value_type computation in <valarray>. 2021-06-05 12:29:36 -04:00
ranges [libc++] [test] Fix some GCC 11 errors/warnings in these tests. NFCI. 2021-06-15 08:37:32 -04:00
re [libcxx][ranges] Implement `ranges::borrowed_range`. 2021-05-20 11:51:44 -07:00
strings [libc++] [test] Fix some GCC 11 errors/warnings in these tests. NFCI. 2021-06-15 08:37:32 -04:00
thread [libc++] Enable the synchronization library on Apple platforms 2021-06-11 12:45:18 -04:00
utilities [libc++] [test] Fix some GCC 11 errors/warnings in these tests. NFCI. 2021-06-15 08:37:32 -04:00
pstl [libc++] Take 2: Integrate the PSTL into libc++ 2019-08-05 18:29:14 +00:00