1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fgimple -fdump-tree-cunroll-blocks-details" } */
5 __extension__
typedef __INT32_TYPE__ i32
;
10 struct a
{i32 a
[8];i32 b
;};
12 void __GIMPLE (ssa
,startwith("fix_loops"))
23 if (_11
!= _Literal (i32
) 0)
32 _1
= _2
+ _Literal (i32
) 1;
34 i_8
= i_19
+ _Literal (i32
) 1;
35 if (i_8
<= _Literal (i32
) 123455)
41 i_19
= __PHI (__BB6
: _Literal (i32
) 1, __BB4
: i_8
);
43 if (_2
!= _Literal (i32
) 0)
49 _9
= _11
+ _Literal (i32
) 1;
54 /* This testcase relies on the fact that we do not eliminate the redundant test
55 for i early. It is necessary to disable all passes that do so, for the
56 moment starting with the loop pipeline is good enough. */
57 /* { dg-final { scan-tree-dump-times "Loop 1 iterates 123454 times" 1 "cunroll" } } */
58 /* { dg-final { scan-tree-dump-times "Last iteration exit edge was proved true" 1 "cunroll" } } */
59 /* { dg-final { scan-tree-dump-times "Exit condition of peeled iterations was eliminated" 1 "cunroll" } } */
60 /* { dg-final { scan-tree-dump-times "loop with 6 iterations completely unrolled" 1 "cunroll" } } */
61 /* { dg-final { scan-tree-dump-not "Invalid sum" "cunroll" } } */