match.pd ((x + y) - (x | y) -> x & y, (x + y) - (x & y) -> x | y): New patterns.
authorMarek Polacek <polacek@redhat.com>
Tue, 23 Jun 2015 10:09:05 +0000 (10:09 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 23 Jun 2015 10:09:05 +0000 (10:09 +0000)
commit9737efaf7e8551eae41e02b5ea61a80a09206f64
tree4792b55d392ce53f4fb5ecc1ae08d6372d753f29
parent7b91cc91f23ea9f964678eb4dcf5cca2e009a659
match.pd ((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): New patterns.

* gcc.dg/fold-minus-4.c: New test.
* gcc.dg/fold-minus-5.c: New test.
* c-c++-common/ubsan/overflow-add-5.c: New test.

From-SVN: r224834
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/overflow-add-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-minus-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-minus-5.c [new file with mode: 0644]