| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O1 -fdump-tree-optimized -fdump-tree-ccp1" } */ |
| 3 |
/* PR tree-optimization/111543 */ |
| 4 |
|
| 5 |
void f_or(int a, int b, int *por) |
| 6 |
{ |
| 7 |
int c = ~a; |
| 8 |
*por = (c | b) | a; |
| 9 |
} |
| 10 |
void f_and(int a, int b, int *pand) |
| 11 |
{ |
| 12 |
int c = ~a; |
| 13 |
*pand = (c & b) & a; |
| 14 |
} |
| 15 |
/* { dg-final { scan-tree-dump-times "pand_\[0-9\]+.D. = 0" 1 "optimized" } } */ |
| 16 |
/* { dg-final { scan-tree-dump-times "por_\[0-9\]+.D. = -1" 1 "optimized" } } */ |
| 17 |
/* { dg-final { scan-tree-dump-times "pand_\[0-9\]+.D. = 0" 1 "ccp1" } } */ |
| 18 |
/* { dg-final { scan-tree-dump-times "por_\[0-9\]+.D. = -1" 1 "ccp1" } } */ |