| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-ffast-math -O3 -fdump-tree-dom3-details" } */ |
| 3 |
|
| 4 |
int I = 50, J = 50; |
| 5 |
int S, L; |
| 6 |
const int *pL; |
| 7 |
const int *pS; |
| 8 |
|
| 9 |
void bar (float, float); |
| 10 |
|
| 11 |
void foo (int K) |
| 12 |
{ |
| 13 |
int k, i, j; |
| 14 |
static float LD, SD; |
| 15 |
for (k = 0 ; k < K; k++) |
| 16 |
{ |
| 17 |
for( i = 0 ; i < ( I - 1 ) ; i++ ) |
| 18 |
{ |
| 19 |
if( ( L < pL[i+1] ) && ( L >= pL[i] ) ) |
| 20 |
break ; |
| 21 |
} |
| 22 |
|
| 23 |
if( i == ( I - 1 ) ) |
| 24 |
L = pL[i] ; |
| 25 |
LD = (float)( L - pL[i] ) / |
| 26 |
(float)( pL[i + 1] - pL[i] ) ; |
| 27 |
|
| 28 |
for( j = 0 ; j < ( J-1 ) ; j++ ) |
| 29 |
{ |
| 30 |
if( ( S < pS[j+1] ) && ( S >= pS[j] ) ) |
| 31 |
break ; |
| 32 |
} |
| 33 |
|
| 34 |
if( j == ( J - 1 ) ) |
| 35 |
S = pS[j] ; |
| 36 |
SD = (float)( S - pS[j] ) / |
| 37 |
(float)( pS[j + 1] - pS[j] ) ; |
| 38 |
|
| 39 |
bar (LD, SD); |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
/* We used to get 1 vrp-thread1 candidates here, but they now get |
| 44 |
deferred until after loop opts are done, because they were rotating |
| 45 |
loops. */ |
| 46 |
/* { dg-final { scan-tree-dump-times "Threaded jump " 2 "dom3" } } */ |