]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr94913.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr94913.c
1 /* PR tree-optimization/94913 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump " (?:b_\[0-9]+\\\(D\\\) >= a|a_\[0-9]+\\\(D\\\) <= b)_\[0-9]+\\\(D\\\);" "optimized" } } */
5 /* { dg-final { scan-tree-dump " (?:c_\[0-9]+\\\(D\\\) > d|d_\[0-9]+\\\(D\\\) < c)_\[0-9]+\\\(D\\\);" "optimized" } } */
6 /* { dg-final { scan-tree-dump " (?:f_\[0-9]+\\\(D\\\) >= e|e_\[0-9]+\\\(D\\\) <= f)_\[0-9]+\\\(D\\\);" "optimized" } } */
7 /* { dg-final { scan-tree-dump " (?:g_\[0-9]+\\\(D\\\) > h|h_\[0-9]+\\\(D\\\) < g)_\[0-9]+\\\(D\\\);" "optimized" } } */
8
9 int
10 foo (unsigned a, unsigned b)
11 {
12 return (a - b - 1) >= a;
13 }
14
15 int
16 bar (unsigned c, unsigned d)
17 {
18 return (c - d - 1) < c;
19 }
20
21 int
22 baz (unsigned e, unsigned f)
23 {
24 unsigned t = e - f;
25 return (t - 1) >= e;
26 }
27
28 int
29 qux (unsigned g, unsigned h)
30 {
31 unsigned t = g - h;
32 return (t - 1) < g;
33 }