| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -fdump-tree-phiopt1-details" } */ |
| 3 |
|
| 4 |
static inline unsigned long long g(int t) |
| 5 |
{ |
| 6 |
unsigned t1 = t; |
| 7 |
return t1; |
| 8 |
} |
| 9 |
static inline int abs1(int a) |
| 10 |
{ |
| 11 |
if (a < 0) |
| 12 |
a = -a; |
| 13 |
return a; |
| 14 |
} |
| 15 |
unsigned long long f(int c, int d, int e) |
| 16 |
{ |
| 17 |
unsigned long long t; |
| 18 |
if (d > e) |
| 19 |
t = g(abs1(d)); |
| 20 |
else |
| 21 |
t = g(abs1(e)); |
| 22 |
return t; |
| 23 |
} |
| 24 |
|
| 25 |
/* { dg-final { scan-tree-dump " = MAX_EXPR" "phiopt1"} } */ |
| 26 |
/* { dg-final { scan-tree-dump-times " = ABS_EXPR" 2 "phiopt1"} } */ |
| 27 |
/* { dg-final { scan-tree-dump-times "changed to factor operation out from" 3 "phiopt1"} } */ |