[AArch64] Emit tighter strong atomic compare-exchange loop when comparing against...
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Jun 2017 14:41:52 +0000 (14:41 +0000)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 31 Jan 2019 12:38:27 +0000 (21:38 +0900)
commit3c47911c1c258dd77da75ef6ba787471033ffb45
tree0228ad1177782c1c9c8cb25580ee0c1571597cd8
parent90ef51578a2f92e4b489d80bd35262bed7813dd5
[AArch64] Emit tighter strong atomic compare-exchange loop when comparing against zero

* config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
Emit CBNZ inside loop when doing a strong exchange and comparing
against zero.  Generate the CC flags after the loop.

* gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c: New test.

(backported c5dcf8e544c5e98f1160ec390111b28d11d73b68)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248832 138bc75d-0d04-0410-961f-82ee72b054a4

Change-Id: I5204c56a8d3c11b0fde6697007d601cbafdb3ccf
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c [new file with mode: 0644]