These memory barriers do nothing on x86, and don't even exist (compile to no code at all),
Not emitting any machine code does not imply that it has no effect on code generation at all. In fact, the fences act as compile-time memory barriers, preventing the code optimizer from reordering memory accesses.