blob: 3001522f259b255f9b73c14808cc562b2895da35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
int foo1(unsigned int x, unsigned int y)
{
int t = __builtin_popcount (x&y);
int t1 = __builtin_popcount (x|y);
return t + t1;
}
int foo2(unsigned int x, unsigned int y)
{
int t1 = __builtin_popcount (x|y);
int t = __builtin_popcount (x&y);
return t + t1;
}
int foo3(unsigned int y, unsigned int x)
{
int t = __builtin_popcount (x&y);
int t1 = __builtin_popcount (x|y);
return t + t1;
}
int foo4(unsigned int y, unsigned int x)
{
int t1 = __builtin_popcount (x|y);
int t = __builtin_popcount (x&y);
return t + t1;
}
/* { dg-final { scan-tree-dump-not " & " "optimized" } } */
/* { dg-final { scan-tree-dump-not " \\| " "optimized" } } */
|