The first one is common across many architectures, including ARM, and the second is just LLVM developers not understanding how cmpxchg works