1 /* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
2 /* { dg-options "-O2 -fgimple -m64 -fdump-tree-ivopts-details" } */
4 /* Exit tests 'i < N1' and 'p2 > p_limit2' can be replaced, so
5 * two ivs i and p2 can be eliminate. */
6 long int __GIMPLE (ssa
,startwith("fix_loops"))
7 foo (long int * p
, long int * p2
, int N1
, int N2
)
17 _1
= (long unsigned int) N2_9(D
);
19 p_limit2_11
= p2_10(D
) + _2
;
33 p2_23
= p2_10(D
) + 8ul;
34 if (p_limit2_11
< p2_23
)
49 if (p_limit2_11
< p2_15
)
61 s_25
= __PHI (__BB7
: 0l, __BB8
: s_18
);
62 p_27
= __PHI (__BB7
: p_22
, __BB8
: p_14
);
63 p2_28
= __PHI (__BB7
: p2_23
, __BB8
: p2_15
);
64 i_29
= __PHI (__BB7
: 1, __BB8
: i_16
);
65 _3
= __MEM
<long int> (p_27
);
76 s_26
= __PHI (__BB12
: s_18
, __BB11
: s_18
, __BB9
: 0l);
80 /* { dg-final { scan-tree-dump-times "Replacing" 2 "ivopts"} } */