| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-Ofast -fno-split-loops -fdump-tree-ifcvt-stats-blocks-details" } */ |
| 3 |
/* { dg-require-visibility "" } */ |
| 4 |
|
| 5 |
int b[256] = {0}, y; |
| 6 |
void bar (int *); |
| 7 |
int foo (int x, int n) |
| 8 |
{ |
| 9 |
int i; |
| 10 |
int a[128]; |
| 11 |
|
| 12 |
for (i = 0; i < n; i++) |
| 13 |
{ |
| 14 |
a[i] = i; |
| 15 |
if (x > i) |
| 16 |
b[i] = y; |
| 17 |
} |
| 18 |
bar (a); |
| 19 |
return 0; |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */ |
| 23 |
|
| 24 |
/* We insert into code |
| 25 |
if (LOOP_VECTORIZED (...)) |
| 26 |
which is folded by vectorizer. Both outgoing edges must have probability |
| 27 |
100% so the resulting profile match after folding. */ |
| 28 |
/* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */ |
| 29 |
/* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */ |
| 30 |
|