gcc/testsuite/gcc.dg/pr87009.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fdump-tree-original" } */ |
| 3 | /* { dg-final { scan-tree-dump-times "return s \\^ x;|return x \\^ s;" 4 "original" } } */ |
| 4 | |
| 5 | int f1 (int x, int s) |
| 6 | { |
| 7 | return ~(~(x|s)|x)|~(~(x|s)|s); |
| 8 | } |
| 9 | |
| 10 | int f2 (int x, int s) |
| 11 | { |
| 12 | return ~(~(~x&s)&~(x&~s)); |
| 13 | } |
| 14 | |
| 15 | int f3 (int x, int s) |
| 16 | { |
| 17 | return ~((x|~s)&(~x|s)); |
| 18 | } |
| 19 | |
| 20 | int f4 (int x, int s) |
| 21 | { |
| 22 | return (x|~s)^(~x|s); |
| 23 | } |