[PATCH] [Power] Improve the expansion of atomic loads/stores
wschmidt at linux.vnet.ibm.com
Thu Oct 2 13:56:16 PDT 2014
I agree that this is legitimate according to the alignment definitions of atomic loads and stores and the atomicity requirements of the PowerPC ISA. A most excellent improvement indeed.
>From the ISA:
Vector storage accesses are not guaranteed to be atomic. The following other types of single-register accesses are always atomic:
* byte accesses (all bytes are aligned on byte boundaries);
* halfword accesses aligned on halfword boundaries;
* word accesses aligned on word boundaries;
* doubleword accesses aligned on doubleword boundaries.
The language in the LLVM IR reference indicates that if this is not the case for load atomic or store atomic, the result is undefined. So this is safe.
More information about the llvm-commits