| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 |
|
| 4 |
int f1(int x) { return ((x >> 8) & 6) != 0; } |
| 5 |
int f2(int x) { return ((x << 2) & 24) != 0; } |
| 6 |
int f3(unsigned x) { return ((x << 2) & 15) != 0; } |
| 7 |
int f4(unsigned x) { return ((x >> 2) & 14) != 0; } |
| 8 |
|
| 9 |
int fifth (int c) |
| 10 |
{ |
| 11 |
int a = (c >> 8) & 7; |
| 12 |
|
| 13 |
if (a >= 2) { |
| 14 |
return 1; |
| 15 |
} else { |
| 16 |
return 0; |
| 17 |
} |
| 18 |
} |
| 19 |
/* { dg-final { scan-tree-dump-not " << " "optimized" } } */ |
| 20 |
/* { dg-final { scan-tree-dump-not " >> " "optimized" } } */ |
| 21 |
|