aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sparc/popc.c
blob: 5442a610fa2deb5d5b74255a6c73798c141516e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { 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 } } */