| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 |
/* { dg-final { scan-tree-dump-not "x_\[0-9]+\\\(D\\\) & y_\[0-9]+\\\(D\\\);" "optimized" } } */ |
| 4 |
/* { dg-final { scan-tree-dump-not "x_\[0-9]+\\\(D\\\) \\| y_\[0-9]+\\\(D\\\);" "optimized" } } */ |
| 5 |
/* { dg-final { scan-tree-dump-times "x_\[0-9]+\\\(D\\\) \\^ y_\[0-9]+\\\(D\\\);" 4 "optimized" } } */ |
| 6 |
/* { dg-final { scan-tree-dump-times "~_\[0-9]\+" 4 "optimized" } } */ |
| 7 |
|
| 8 |
int |
| 9 |
a (int x, int y) |
| 10 |
{ |
| 11 |
int t = x & y; |
| 12 |
int tt = x | y; |
| 13 |
t = t - tt; |
| 14 |
return t + -1; |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
b (int x, int y) |
| 19 |
{ |
| 20 |
int t = x & y; |
| 21 |
int tt = x | y; |
| 22 |
t = t - 1; |
| 23 |
return t - tt; |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
c (int x, int y) |
| 28 |
{ |
| 29 |
int t = x & y; |
| 30 |
int tt = x | y; |
| 31 |
tt = tt + 1; |
| 32 |
return t - tt; |
| 33 |
} |
| 34 |
|
| 35 |
int |
| 36 |
d (int x, int y) |
| 37 |
{ |
| 38 |
int t = x & y; |
| 39 |
int tt = x | y; |
| 40 |
tt = tt + 1; |
| 41 |
return t - tt; |
| 42 |
} |