2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20150120-3.c
blob322556f4add1ca9c081d35ac9dae55b6ba0f3262
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-original" } */
4 /* x | ~(x | y) -> x | ~y */
5 int fn1 (int x, int y)
7 return x | ~(x | y);
9 int fn2 (int x, int y)
11 return ~(x | y) | x;
13 int fn3 (int x, int y)
15 return x | ~(y | x);
17 int fn4 (int x, int y)
19 return ~(y | x) | x;
21 int fn5 (int z)
23 return z | ~(z | 3);
25 int fn6 (int z)
27 return ~(z | 3) | z;
31 /* { dg-final { scan-tree-dump-times "~y \\| x" 4 "original" } } */
32 /* { dg-final { scan-tree-dump-times "z \\| -4" 2 "original" } } */