1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 
4 int
foo(int x)5 foo (int x)
6 {
7   return __builtin_popcount (x);
8 }
9 
10 long
foo1(long x)11 foo1 (long x)
12 {
13   return __builtin_popcountl (x);
14 }
15 
16 long long
foo2(long long x)17 foo2 (long long x)
18 {
19   return __builtin_popcountll (x);
20 }
21 
22 /* { dg-final { scan-assembler-not "popcount" } } */
23 /* { dg-final { scan-assembler-times "cnt\t" 3 } } */
24