]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/pr104645.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr104645.c
CommitLineData
d9c03fc2
JJ
1/* PR tree-optimization/104645 */
2/* { dg-do compile } */
3/* { dg-options "-O2 -fdump-tree-optimized" } */
4/* { dg-final { scan-tree-dump-not " = PHI <" "optimized" } } */
5
6int
7foo (unsigned i)
8{
9 return i ? i % 2 : 0;
10}
11
12int
13bar (unsigned i)
14{
15 int b = 0;
16 if (i)
17 {
18 unsigned a = i & 1;
19 b = a;
20 }
21 return b;
22}
23
24int
25baz (unsigned i)
26{
27 return i ? i + 4 : 4;
28}