As Itanium ABI[http://itanium-cxx-abi.github.io/cxx-abi/abi.html#once-ctor] points out:
The size of the guard variable is 64 bits. The first byte (i.e. the byte at the address of the full variable) shall contain the value 0 prior to initialization of the associated variable, and 1 after initialization is complete.
We should manipulate the first byte of guard variable in both load and store operation in general cases.
Okay, so the store here is wrong, but it's got nothing to do with AIX.
The ABI doc (http://itanium-cxx-abi.github.io/cxx-abi/abi.html#once-ctor) says:
So the bug here seems to be that the Itanium ABI implementation in Clang is incorrect for big-endian systems.