aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_strong_1.c
blob: b14a7c294376f03cd13077d18d865f83a04bd04e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "-O2" } */

int
foo (int *a)
{
  int x = 0;
  return __atomic_compare_exchange_n (a, &x, 4, 0,
				      __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
}

/* { dg-final { scan-assembler-times "cbnz\\tw\[0-9\]+" 2 } } */