libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-thread-14.c
blob51fc06571220d87f66725ca462e6b1265b464524
1 /* { dg-do compile } */
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" } } */
5 void foo (void);
6 void bar (void);
7 void blah (void);
9 /* One jump threaded here. */
11 void
12 baz_1 (int a, int b, int c)
14 if (a && b)
15 foo ();
16 if (!b && c)
17 bar ();
20 /* One jump threaded here. */
22 void
23 baz_2 (int a, int b, int c)
25 if (a && b)
26 foo ();
27 if (b || c)
28 bar ();
31 /* One jump threaded here. */
33 void
34 baz_3 (int a, int b, int c)
36 if (a && b > 10)
37 foo ();
38 if (b < 5 && c)
39 bar ();
42 /* Two jumps threaded here. */
44 void
45 baz_4 (int a, int b, int c)
47 if (a && b)
49 foo ();
50 if (c)
51 bar ();
53 if (b && c)
54 blah ();
57 /* Two jumps threaded here. */
59 void
60 baz_5 (int a, int b, int c)
62 if (a && b)
64 foo ();
65 if (c)
66 bar ();
68 if (!b || !c)
69 blah ();
72 /* One jump threaded here. */
74 void
75 baz_6 (int a, int b, int c)
77 if (a == 39 && b == 41)
78 foo ();
79 if (c == 12 || b == 41)
80 bar ();