gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -march=armv8-a+nolse -mno-outline-atomics" } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */ |
| 4 | |
| 5 | int |
| 6 | foo (int *a) |
| 7 | { |
| 8 | int x = 0; |
| 9 | return __atomic_compare_exchange_n (a, &x, 4, 0, |
| 10 | __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE); |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-assembler-times "cbnz\\tw\[0-9\]+" 2 } } */ |