| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O1 -funsafe-math-optimizations -fdump-tree-recip" } */ |
| 3 |
|
| 4 |
float u, v, w, x, y, z; |
| 5 |
|
| 6 |
void e(float a, float b, float c, float d, float e, float f) |
| 7 |
{ |
| 8 |
if (a < b) |
| 9 |
{ |
| 10 |
a = a + b; |
| 11 |
c = c + d; |
| 12 |
} |
| 13 |
|
| 14 |
/* The PHI nodes for these divisions should be combined. */ |
| 15 |
d = d / a; |
| 16 |
e = e / a; |
| 17 |
f = f / a; |
| 18 |
|
| 19 |
a = a / c; |
| 20 |
b = b / c; |
| 21 |
|
| 22 |
/* This should not be left as a multiplication. */ |
| 23 |
c = 1 / c; |
| 24 |
|
| 25 |
u = a; |
| 26 |
v = b; |
| 27 |
w = c; |
| 28 |
x = d; |
| 29 |
y = e; |
| 30 |
z = f; |
| 31 |
} |
| 32 |
|
| 33 |
/* { dg-final { scan-tree-dump-times " / " 2 "recip" } } */ |
| 34 |
/* { dg-final { scan-tree-dump-times " \\* " 5 "recip" } } */ |