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