libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-popcount-8a.c
blob3001522f259b255f9b73c14808cc562b2895da35
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 int foo1(unsigned int x, unsigned int y)
6 int t = __builtin_popcount (x&y);
7 int t1 = __builtin_popcount (x|y);
8 return t + t1;
11 int foo2(unsigned int x, unsigned int y)
13 int t1 = __builtin_popcount (x|y);
14 int t = __builtin_popcount (x&y);
15 return t + t1;
18 int foo3(unsigned int y, unsigned int x)
20 int t = __builtin_popcount (x&y);
21 int t1 = __builtin_popcount (x|y);
22 return t + t1;
25 int foo4(unsigned int y, unsigned int x)
27 int t1 = __builtin_popcount (x|y);
28 int t = __builtin_popcount (x&y);
29 return t + t1;
32 /* { dg-final { scan-tree-dump-not " & " "optimized" } } */
33 /* { dg-final { scan-tree-dump-not " \\| " "optimized" } } */