MO_AcquireFence: Less restrictive barrier
GCC and CLang translate the built-in atomic_thread_fence(memory_order_acquire)
to dmb ishld
, which is a bit less restrictive than dmb ish
(which also implies stores.)
As GHC's current memory mode is inspired by the C11 memory model, it should be valid to transfer this insight from C to GHC/Cmm.
Here's a Godbolt project to check this: https://godbolt.org/z/doGzrMTjf
Edited by Sven Tennie