It would be nice to know whether or not casIORef, fetchAddByteArray, etc. represent memory barriers, or not, at the compiler level. In other words, may GHC reorder stores or loads across these operations, regardless of whether the underlying primop is a barrier on a particular architecture? Or like atomicModifyIORef do they guarantee some ordering?
There's mention of how the read operations don't imply any barriers, which suggests that maybe the atomic ops do. If this isn't defined in GHC then it would be nice to clarify that there, obviously. Thanks!