Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / 20150120-1.c
blob18906c47a0974cc74d2bf56d0cdf786aef32aabc
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-original" } */
4 /* x + (x & 1) -> (x + 1) & ~1 */
5 int
6 fn1 (int x)
8 return x + (x & 1);
10 int
11 fn2 (int x)
13 return (x & 1) + x;
15 int
16 fn3 (int x)
18 return x + (1 & x);
20 int
21 fn4 (int x)
23 return (1 & x) + x;
25 unsigned int
26 fn5 (unsigned int x)
28 return x + (x & 1);
30 unsigned int
31 fn6 (unsigned int x)
33 return (x & 1) + x;
35 unsigned int
36 fn7 (unsigned int x)
38 return x + (x % 2);
40 unsigned int
41 fn8 (unsigned int x)
43 return (x % 2) + x;
45 unsigned int
46 fn9 (unsigned int x)
48 return (1LL & x) + x;
51 /* { dg-final { scan-tree-dump-times "x \\+ 1" 9 "original" } } */