]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/20150120-1.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / 20150120-1.c
CommitLineData
0f770b01
RV
1/* { dg-do compile } */
2/* { dg-options "-O2 -fdump-tree-original" } */
3
4/* x + (x & 1) -> (x + 1) & ~1 */
5int
6fn1 (int x)
7{
8 return x + (x & 1);
9}
10int
11fn2 (int x)
12{
13 return (x & 1) + x;
14}
15int
16fn3 (int x)
17{
18 return x + (1 & x);
19}
20int
21fn4 (int x)
22{
23 return (1 & x) + x;
24}
25unsigned int
26fn5 (unsigned int x)
27{
28 return x + (x & 1);
29}
30unsigned int
31fn6 (unsigned int x)
32{
33 return (x & 1) + x;
34}
35unsigned int
36fn7 (unsigned int x)
37{
38 return x + (x % 2);
39}
40unsigned int
41fn8 (unsigned int x)
42{
43 return (x % 2) + x;
44}
45unsigned int
46fn9 (unsigned int x)
47{
48 return (1LL & x) + x;
49}
50
51/* { dg-final { scan-tree-dump-times "x \\+ 1" 9 "original" } } */