https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94622
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aaron Sawdey <acsaw...@gcc.gnu.org>: https://gcc.gnu.org/g:3bcdb5dec72b6d7b197821c2b814bc9fc07f4628 commit r10-7889-g3bcdb5dec72b6d7b197821c2b814bc9fc07f4628 Author: Aaron Sawdey <acsaw...@linux.ibm.com> Date: Mon Apr 20 13:01:43 2020 -0500 Use plq/pstq for atomic_{load,store}<mode> For future architecture with prefix instructions, always use plq/pstq rather than lq/stq for atomic load of quadword. Then we never have to do the doubleword swap on little endian. Before this fix, -mno-pcrel would generate lq with the doubleword swap (which was ok) and -mpcrel would generate plq, also with the doubleword swap, which was wrong. 2020-04-20 Aaron Sawdey <acsaw...@linux.ibm.com> PR target/94622 * config/rs6000/sync.md (load_quadpti): Add attr "prefixed" if TARGET_PREFIXED. (store_quadpti): Ditto. (atomic_load<mode>): Do not swap doublewords if TARGET_PREFIXED as plq will be used and doesn't need it. (atomic_store<mode>): Ditto, for pstq.