Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ivopt_mult_2g.c
blob38f547657d116791bd18edd72d44d0c742aafa83
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)
9 long int s;
10 long int * p_limit2;
11 int i;
12 long unsigned int _1;
13 long unsigned int _2;
14 long int _3;
16 bb_2:
17 _1 = (long unsigned int) N2_9(D);
18 _2 = _1 * 8ul;
19 p_limit2_11 = p2_10(D) + _2;
20 if (N1_13(D) > 0)
21 goto bb_3;
22 else
23 goto bb_13;
25 bb_13:
27 bb_9:
28 goto bb_6;
30 bb_3:
31 p_22 = p_12(D) + 8ul;
32 p2_23 = p2_10(D) + 8ul;
33 if (p_limit2_11 < p2_23)
34 goto bb_14;
35 else
36 goto bb_7;
38 bb_14:
39 goto bb_9;
41 bb_7:
42 goto bb_5;
44 bb_4:
45 p_14 = p_27 + 8ul;
46 p2_15 = p2_28 + 8ul;
47 i_16 = i_29 + 1;
48 if (p_limit2_11 < p2_15)
49 goto bb_11;
50 else
51 goto bb_8;
53 bb_11:
54 goto bb_6;
56 bb_8:
59 bb_5:
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);
65 s_18 = _3 + s_25;
66 if (N1_13(D) > i_29)
67 goto bb_4;
68 else
69 goto bb_12;
71 bb_12:
74 bb_6:
75 s_26 = __PHI (bb_12: s_18, bb_11: s_18, bb_9: 0l);
76 return s_26;
79 /* { dg-final { scan-tree-dump-times "Replacing" 2 "ivopts"} } */