Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr90693.c

raw
1 /* PR tree-optimization/90693 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mno-abm -mno-popcnt -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not "POPCOUNT \\\(" "optimized" } } */
5 /* { dg-final { scan-tree-dump-not "__builtin_popcount(ll)? \\\(" "optimized" } } */
6
7 int
8 foo (unsigned int x)
9 {
10 return __builtin_popcount (x) == 1;
11 }
12
13 int
14 bar (unsigned int x)
15 {
16 return (x ^ (x - 1)) > x - 1;
17 }
18
19 int
20 baz (unsigned long long x)
21 {
22 return __builtin_popcountll (x) == 1;
23 }
24
25 int
26 qux (unsigned long long x)
27 {
28 return (x ^ (x - 1)) > x - 1;
29 }