fold-const.c (fold_binary_loc): Move Fold (A & ~B) - (A & B) into (A ^ B) - B to...
commit10158317660dcb6db1913913ce99073078314b4f
authorRichard Biener <rguenther@suse.de>
Fri, 23 Oct 2015 10:30:49 +0000 (23 10:30 +0000)
committerNaveen H.S <naveenh@gcc.gnu.org>
Fri, 23 Oct 2015 10:30:49 +0000 (23 10:30 +0000)
tree6edab16c40f866feae5870ec73f43a78ec0448f5
parent95fef24ff9a7ed0a90781fd153e797d086aa2647
fold-const.c (fold_binary_loc): Move Fold (A & ~B) - (A & B) into (A ^ B) - B to match.pd Move (X & ~Y) | (~X &...

2015-10-23  Richard Biener  <rguenther@suse.de>
    Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

* fold-const.c (fold_binary_loc) : Move Fold (A & ~B) - (A & B)
into (A ^ B) - B to match.pd
Move (X & ~Y) | (~X & Y) is X ^ Y to match.pd.

* match.pd (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)):
New simplifier.
(minus (bit_and:s @0 INTEGER_CST@2) (bit_and:s @0 INTEGER_CST@1)):
New simplifier.
(minus (bit_and:s @0 @1) (bit_and:cs @0 (bit_not @1))):
New simplifier.
(bit_ior:c (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1)):
New simplifier.
(bit_ior:c (bit_and @0 INTEGER_CST@2) (bit_and (bit_not @0)
INTEGER_CST@1)): New simplifier.

Co-Authored-By: Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
From-SVN: r229225
gcc/ChangeLog
gcc/fold-const.c
gcc/match.pd