LLVM: Implement atomic operations in terms of LLVM primitives