]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-thread-14.c
CommitLineData
e26584b2 1/* { dg-do compile } */
4b3a325f
AH
2/* { dg-additional-options "-O2 --param logical-op-non-short-circuit=1 -fdump-tree-threadfull1-details" } */
3/* { dg-final { scan-tree-dump-times "Registering jump thread" 8 "threadfull1" } } */
5a956111
PP
4
5void foo (void);
6void bar (void);
7void blah (void);
8
9/* One jump threaded here. */
10
11void
12baz_1 (int a, int b, int c)
13{
14 if (a && b)
15 foo ();
16 if (!b && c)
17 bar ();
18}
19
20/* One jump threaded here. */
21
22void
23baz_2 (int a, int b, int c)
24{
25 if (a && b)
26 foo ();
27 if (b || c)
28 bar ();
29}
30
31/* One jump threaded here. */
32
33void
34baz_3 (int a, int b, int c)
35{
36 if (a && b > 10)
37 foo ();
38 if (b < 5 && c)
39 bar ();
40}
41
42/* Two jumps threaded here. */
43
44void
45baz_4 (int a, int b, int c)
46{
47 if (a && b)
48 {
49 foo ();
50 if (c)
51 bar ();
52 }
53 if (b && c)
54 blah ();
55}
56
57/* Two jumps threaded here. */
58
59void
60baz_5 (int a, int b, int c)
61{
62 if (a && b)
63 {
64 foo ();
65 if (c)
66 bar ();
67 }
68 if (!b || !c)
69 blah ();
70}
71
72/* One jump threaded here. */
73
74void
75baz_6 (int a, int b, int c)
76{
77 if (a == 39 && b == 41)
78 foo ();
79 if (c == 12 || b == 41)
80 bar ();
81}