ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/sparc/popc-1.c

19 lines
324 B
C

/* { dg-do compile } */
/* { dg-options "-mcpu=niagara2" } */
int test_popcount(int a)
{
return __builtin_popcount(a);
}
long test_popcountl(long a)
{
return __builtin_popcountl(a);
}
long long test_popcountll(long long a)
{
return __builtin_popcountll(a);
}
/* { dg-final { scan-assembler-times "popc\t%" 3 } } */