libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ranger-threader-4.c
blobdde43ff886c89dc6239a21003871ed3fdbd67c79
1 /* { dg-do compile } */
2 /* { dg-additional-options "-O2 -fdump-tree-threadfull1-details --param logical-op-non-short-circuit=1" } */
3 /* { dg-final { scan-tree-dump-times "Registering jump" 8 "threadfull1" } } */
5 /* Copied from ssa-thread-14. */
7 void foo (void);
8 void bar (void);
9 void blah (void);
11 /* One jump threaded here. */
13 void
14 baz_1 (int a, int b, int c)
16 if (a && b)
17 foo ();
18 if (!b && c)
19 bar ();
22 /* One jump threaded here. */
24 void
25 baz_2 (int a, int b, int c)
27 if (a && b)
28 foo ();
29 if (b || c)
30 bar ();
33 /* One jump threaded here. */
35 void
36 baz_3 (int a, int b, int c)
38 if (a && b > 10)
39 foo ();
40 if (b < 5 && c)
41 bar ();
44 /* Two jumps threaded here. */
46 void
47 baz_4 (int a, int b, int c)
49 if (a && b)
51 foo ();
52 if (c)
53 bar ();
55 if (b && c)
56 blah ();
59 /* Two jumps threaded here. */
61 void
62 baz_5 (int a, int b, int c)
64 if (a && b)
66 foo ();
67 if (c)
68 bar ();
70 if (!b || !c)
71 blah ();
74 /* One jump threaded here. */
76 void
77 baz_6 (int a, int b, int c)
79 if (a == 39 && b == 41)
80 foo ();
81 if (c == 12 || b == 41)
82 bar ();