]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr94882.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr94882.c
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\\\);" 5 "optimized" } } */
6 /* { dg-final { scan-tree-dump-times "~_\[0-9]\+" 5 "optimized" } } */
7
8 int
9 a (int x, int y)
10 {
11 return (x & y) - (x | y) - 1;
12 }
13
14 int
15 b (int x, int y)
16 {
17 return (x & y) - 1 - (x | y);
18 }
19
20 int
21 c (int x, int y)
22 {
23 return (x & y) - ((x | y) + 1);
24 }
25
26 int
27 d (int x, int y)
28 {
29 return (x & y) - (1 + (x | y));
30 }
31
32 int
33 e (int x, int y)
34 {
35 return (unsigned) ((x & y) - (x | y)) + -1u;
36 }