gcc/testsuite/gcc.target/sparc/popc-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-mcpu=niagara2" } */ |
| 3 | int test_popcount(int a) |
| 4 | { |
| 5 | return __builtin_popcount(a); |
| 6 | } |
| 7 | |
| 8 | long test_popcountl(long a) |
| 9 | { |
| 10 | return __builtin_popcountl(a); |
| 11 | } |
| 12 | |
| 13 | long long test_popcountll(long long a) |
| 14 | { |
| 15 | return __builtin_popcountll(a); |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-assembler-times "popc\t%" 3 } } */ |