[AArch64] Emit tighter strong atomic compare-exchange loop when comparing against...
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Fri, 2 Jun 2017 14:41:52 +0000 (14:41 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Fri, 2 Jun 2017 14:41:52 +0000 (14:41 +0000)
commit17f47f8621099fdc4b0fc6681924f97230c8a114
tree2df2a714bac3eab1853d01ddacfcd431129dd2a3
parente3bd1c68738bd4e67ece407d6aa95811b44f77f9
[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.

From-SVN: r248832
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]