OSDN Git Service

b181cfa4c0d11457b2092694a1905a2f3830ce2e
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp24.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1-details" } */
3
4
5 struct rtx_def;
6 typedef struct rtx_def *rtx;
7 union rtunion_def
8 {
9   rtx rt_rtx;
10 };
11 typedef union rtunion_def rtunion;
12 struct rtx_def
13 {
14   int code;
15   union u
16   {
17     rtunion fld[1];
18   } u;
19 };
20
21 sss (rtx insn, int code1, int code2, int code3)
22 {
23   _Bool D1562;
24   struct rtx_def * body;
25   int i;
26   int n_sets;
27   int D1544;
28
29   body = insn->u.fld[5].rt_rtx;
30   D1544 = body->code;
31   n_sets = 1;
32   if (D1544 == 55) goto L7; else goto L1;
33
34 L1:
35   n_sets = 0;
36   if (code3 == 99) goto L2; else goto L11;
37
38 L2:
39   D1562 = code1 == 10;
40   n_sets = (int) D1562;
41   if (n_sets > 0) goto L7; else goto L11;
42
43 L37:
44   if (code2 == 42) goto L8; else goto L9;
45
46 L8:
47   arf ();
48
49 L9:
50   i = i + 1;
51   if (i < n_sets) goto L37; else goto L32;
52
53 L32:
54
55 L11:
56   if (n_sets > 1) goto L12; else goto L15;
57
58 L12:
59   nit ();
60
61 L14:
62   i = 0;
63   goto L38;
64
65 L15:
66   if (n_sets > 0) goto L14; else goto L16;
67
68 L38:
69   frob ();
70   i = i + 1;
71   if (n_sets > i) goto L38; else goto L16;
72
73 L16:
74   return;
75
76 L7:
77   i = 0;
78   goto L37;
79
80 }
81
82
83
84 /* The n_sets > 0 test can be simplified into n_sets == 1 since the
85    only way to reach the test is when n_sets <= 1, and the only value
86    which satisfies both conditions is n_sets == 1.  */
87 /* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
88 /* { dg-final { cleanup-tree-dump "vrp1" } } */
89