blob: e59be003abb7b883679786005f4949ce9e4ba0d7 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
int foo(unsigned short x)
{
unsigned short t1 = __builtin_bswap16(x);
unsigned int t2 = t1;
return __builtin_popcount (t2);
}
int fool(unsigned short x)
{
unsigned short t1 = __builtin_bswap16(x);
unsigned long t2 = t1;
return __builtin_popcountl (t2);
}
int fooll(unsigned short x)
{
unsigned short t1 = __builtin_bswap16(x);
unsigned long long t2 = t1;
return __builtin_popcountll (t2);
}
/* { dg-final { scan-tree-dump-not "bswap" "optimized" } } */