111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O3 -fdump-tree-ivcanon-details" } */
|
|
3 int a[1];
|
|
4 void test2 (void);
|
|
5 void
|
|
6 test(int c)
|
|
7 {
|
|
8 int i=0,j;
|
|
9 for (i=0;i<c;i++)
|
|
10 {
|
|
11 for (j=0;j<c;j++)
|
|
12 {
|
|
13 a[i]=5;
|
|
14 test2();
|
|
15 }
|
|
16 }
|
|
17 }
|
|
18
|
|
19 /* We should do this as part of cunrolli, but our cost model do not take into account early exit
|
|
20 from the last iteration. */
|
|
21 /* { dg-final { scan-tree-dump "loop turned into non-loop; it never loops." "ivcanon"} } */
|
|
22 /* { dg-final { scan-tree-dump "Last iteration exit edge was proved true." "ivcanon"} } */
|