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 (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
;
32 p2_23
= p2_10(D
) + 8ul;
33 if (p_limit2_11
< p2_23
)
48 if (p_limit2_11
< p2_15
)
60 s_25
= __PHI (bb_7
: 0l, bb_8
: s_18
);
61 p_27
= __PHI (bb_7
: p_22
, bb_8
: p_14
);
62 p2_28
= __PHI (bb_7
: p2_23
, bb_8
: p2_15
);
63 i_29
= __PHI (bb_7
: 1, bb_8
: i_16
);
64 _3
= __MEM
<long int> (p_27
);
75 s_26
= __PHI (bb_12
: s_18
, bb_11
: s_18
, bb_9
: 0l);
79 /* { dg-final { scan-tree-dump-times "Replacing" 2 "ivopts"} } */