libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr94882-2.c
blob7f533b6d468b9928167837f0db263fe6e3dd6a0d
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 /* { dg-final { scan-tree-dump-not "x_\[0-9]+\\\(D\\\) & y_\[0-9]+\\\(D\\\);" "optimized" } } */
4 /* { dg-final { scan-tree-dump-not "x_\[0-9]+\\\(D\\\) \\| y_\[0-9]+\\\(D\\\);" "optimized" } } */
5 /* { dg-final { scan-tree-dump-times "x_\[0-9]+\\\(D\\\) \\^ y_\[0-9]+\\\(D\\\);" 8 "optimized" } } */
6 /* { dg-final { scan-tree-dump-times "~_\[0-9]\+" 8 "optimized" } } */
8 int
9 a (int x, int y)
11 unsigned t = x & y;
12 unsigned tt = x | y;
13 t = t - tt;
14 return t + -1;
17 int
18 a1 (int x, int y)
20 int t = x & y;
21 int tt = x | y;
22 unsigned t1 = t - tt;
23 return t1 + -1;
26 int
27 b (int x, int y)
29 unsigned t = x & y;
30 unsigned tt = x | y;
31 t = t - 1;
32 return t - tt;
35 int
36 b1 (int x, int y)
38 int t = x & y;
39 int tt = x | y;
40 unsigned t1 = t - 1;
41 return t1 - tt;
44 int
45 c (int x, int y)
47 unsigned t = x & y;
48 unsigned tt = x | y;
49 tt = tt + 1;
50 return t - tt;
53 int
54 c1 (int x, int y)
56 int t = x & y;
57 int tt = x | y;
58 unsigned tt1 = tt + 1;
59 return t - tt1;
62 int
63 d (int x, int y)
65 unsigned t = x & y;
66 unsigned tt = x | y;
67 tt = tt + 1;
68 return t - tt;
71 int
72 d1 (int x, int y)
74 int t = x & y;
75 int tt = x | y;
76 unsigned tt1 = tt + 1;
77 return t - tt1;