| 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\\\);" 8 "optimized" } } */ |
| 6 |
/* { dg-final { scan-tree-dump-times "~_\[0-9]\+" 8 "optimized" } } */ |
| 7 |
|
| 8 |
int |
| 9 |
a (int x, int y) |
| 10 |
{ |
| 11 |
unsigned t = x & y; |
| 12 |
unsigned tt = x | y; |
| 13 |
t = t - tt; |
| 14 |
return t + -1; |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
a1 (int x, int y) |
| 19 |
{ |
| 20 |
int t = x & y; |
| 21 |
int tt = x | y; |
| 22 |
unsigned t1 = t - tt; |
| 23 |
return t1 + -1; |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
b (int x, int y) |
| 28 |
{ |
| 29 |
unsigned t = x & y; |
| 30 |
unsigned tt = x | y; |
| 31 |
t = t - 1; |
| 32 |
return t - tt; |
| 33 |
} |
| 34 |
|
| 35 |
int |
| 36 |
b1 (int x, int y) |
| 37 |
{ |
| 38 |
int t = x & y; |
| 39 |
int tt = x | y; |
| 40 |
unsigned t1 = t - 1; |
| 41 |
return t1 - tt; |
| 42 |
} |
| 43 |
|
| 44 |
int |
| 45 |
c (int x, int y) |
| 46 |
{ |
| 47 |
unsigned t = x & y; |
| 48 |
unsigned tt = x | y; |
| 49 |
tt = tt + 1; |
| 50 |
return t - tt; |
| 51 |
} |
| 52 |
|
| 53 |
int |
| 54 |
c1 (int x, int y) |
| 55 |
{ |
| 56 |
int t = x & y; |
| 57 |
int tt = x | y; |
| 58 |
unsigned tt1 = tt + 1; |
| 59 |
return t - tt1; |
| 60 |
} |
| 61 |
|
| 62 |
int |
| 63 |
d (int x, int y) |
| 64 |
{ |
| 65 |
unsigned t = x & y; |
| 66 |
unsigned tt = x | y; |
| 67 |
tt = tt + 1; |
| 68 |
return t - tt; |
| 69 |
} |
| 70 |
|
| 71 |
int |
| 72 |
d1 (int x, int y) |
| 73 |
{ |
| 74 |
int t = x & y; |
| 75 |
int tt = x | y; |
| 76 |
unsigned tt1 = tt + 1; |
| 77 |
return t - tt1; |
| 78 |
} |