2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-ior-2.c
blob41b372d06fa1faa01e725f44c5203e2097f1dd2e
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-cddce1" } */
4 int
5 fn1 (int x)
7 return ~x | x;
10 int
11 fn2 (int x)
13 return x | ~x;
16 unsigned int
17 fn3 (unsigned int x)
19 return ~x | x;
22 unsigned int
23 fn4 (unsigned int x)
25 return x | ~x;
28 int
29 fn5 (int x)
31 return ~x | (unsigned) x;
34 int
35 fn6 (int x)
37 return (unsigned) ~x | x;
40 int
41 fn7 (int x)
43 return ~(unsigned) x | x;
46 /* { dg-final { scan-tree-dump-not "~" "cddce1" } } */
47 /* { dg-final { scan-tree-dump-not " \\| " "cddce1" } } */