]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr107043.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr107043.c
1 // { dg-do compile }
2 // { dg-options "-O2 -fdump-tree-evrp" }
3
4 int g0(int n)
5 {
6 int n1 = n & 0x8000;
7 if (n1 == 0)
8 return 1;
9 // n1 will be 0x8000 here.
10 return (n1 >> 15) & 0x1;
11 }
12
13 int g1(int n)
14 {
15 int n1 = n & 0x8000;
16 if (n1 == 0)
17 return 1;
18 // n>>15 will be xxxxxx1 here.
19 return (n >> 15) & 0x1;
20 }
21
22 // { dg-final { scan-tree-dump-times "return 1;" 2 "evrp" } }