PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp24.c
blob85e5b62d14804e1661a802445093690daa24f6ad
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1-details" } */
5 struct rtx_def;
6 typedef struct rtx_def *rtx;
7 union rtunion_def
9 rtx rt_rtx;
11 typedef union rtunion_def rtunion;
12 struct rtx_def
14 int code;
15 union u
17 rtunion fld[1];
18 } u;
21 sss (rtx insn, int code1, int code2, int code3)
23 _Bool D1562;
24 struct rtx_def * body;
25 int i;
26 int n_sets;
27 int D1544;
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;
34 L1:
35 n_sets = 0;
36 if (code3 == 99) goto L2; else goto L11;
38 L2:
39 D1562 = code1 == 10;
40 n_sets = (int) D1562;
41 if (n_sets > 0) goto L7; else goto L11;
43 L37:
44 if (code2 == 42) goto L8; else goto L9;
46 L8:
47 arf ();
49 L9:
50 i = i + 1;
51 if (i < n_sets) goto L37; else goto L32;
53 L32:
55 L11:
56 if (n_sets > 1) goto L12; else goto L15;
58 L12:
59 nit ();
61 L14:
62 i = 0;
63 goto L38;
65 L15:
66 if (n_sets > 0) goto L14; else goto L16;
68 L38:
69 frob ();
70 i = i + 1;
71 if (n_sets > i) goto L38; else goto L16;
73 L16:
74 return;
76 L7:
77 i = 0;
78 goto L37;
82 /* The first n_sets > 0 test can be simplfiied into n_sets == 1 since
83 n_sets can only have the values [0, 1] as it's the result of a
84 boolean operation.
86 The second n_sets > 0 test can also be simplified into n_sets == 1
87 as the only way to reach the tests is when n_sets <= 1 and the only
88 value which satisfies both conditions is n_sets == 1. */
89 /* { dg-final { scan-tree-dump-times "Simplified relational" 2 "vrp1" } } */
90 /* { dg-final { cleanup-tree-dump "vrp1" } } */