blob: fc225764e6bac928eba726e49bfcd12b6a9d2014 [file] [log] [blame]
/* { dg-options "-O2 -muniform-simt -misa=sm_70 -mptx=_" } */
enum memmodel
{
MEMMODEL_RELAXED = 0,
};
int a = 0;
int
f (void)
{
int expected = 1;
return __atomic_compare_exchange_n (&a, &expected, 0, 0, MEMMODEL_RELAXED,
MEMMODEL_RELAXED);
}
/* { dg-final { scan-assembler-times "@%r\[0-9\]*\tatom.global.cas" 1 } } */
/* { dg-final { scan-assembler-times "shfl.sync.idx.b32" 1 } } */