summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/popcount-2.c
blob: 43b2ce7fae51d56ac5c2d1d1016367a471ac89ec (plain)
1
2
3
4
5
6
7
8
9
/* { dg-do compile { target { ilp32 } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-options "-O2 -mcpu=power7" } */
/* { dg-final { scan-assembler "popcntw" } } */

int foo(int x)
{
  return __builtin_popcount(x);
}