match.pd ((x ^ y) ^ (x | y) -> x & y, (x & y) + (x ^ y) -> x | y, (x & y) | (x ^...
authorMarek Polacek <polacek@redhat.com>
Mon, 22 Jun 2015 14:46:14 +0000 (14:46 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 22 Jun 2015 14:46:14 +0000 (14:46 +0000)
commit9ea65ca6889dc34515be84336175299ad9a44b6a
tree9c3319aa59047461dbd2781dc41cf35f91cb0185
parentf4f9641b128d7692943f6378822ef79a69056427
match.pd ((x ^ y) ^ (x | y) -> x & y, (x & y) + (x ^ y) -> x | y, (x & y) | (x ^ y) -> x | y, (x & y) ^ (x ^ y) -> x | y, (x & y) + (x | y) -> x + y, (x | y) - (x ^ y) -> x & y, (x | y) - (x & y) -> x ^ y): New patterns.

* match.pd ((x ^ y) ^ (x | y) -> x & y,
(x & y) + (x ^ y) -> x | y, (x & y) | (x ^ y) -> x | y,
(x & y) ^ (x ^ y) -> x | y, (x & y) + (x | y) -> x + y,
(x | y) - (x ^ y) -> x & y, (x | y) - (x & y) -> x ^ y): New patterns.

* gcc.dg/fold-ior-1.c: New test.
* gcc.dg/fold-minus-2.c: New test.
* gcc.dg/fold-minus-3.c: New test.
* gcc.dg/fold-plus-1.c: New test.
* gcc.dg/fold-plus-2.c: New test.
* gcc.dg/fold-xor-4.c: New test.
* gcc.dg/fold-xor-5.c: New test.

From-SVN: r224734
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fold-ior-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-minus-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-minus-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-plus-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-plus-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-xor-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-xor-5.c [new file with mode: 0644]