1 /* PR target/59874 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mpopcnt -masm=att" } */
4 /* { dg-final { scan-assembler "\tpopcntw" { target { ! *-*-darwin* } } } } */
5 /* { dg-final { scan-assembler "\tpopcnt" { target *-*-darwin* } } } */
6 
7 unsigned int
foo(unsigned short x)8 foo (unsigned short x)
9 {
10   return __builtin_popcount (x);
11 }
12