From a9658b115b061ddb02bc809d5923cb14b0678256 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 26 Oct 2015 13:27:59 +0000 Subject: [PATCH] match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c. 2015-10-26 Richard Biener * match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c. ( (X & ~Y) | (~X & Y) -> X ^ Y): Remove redundant :c. From-SVN: r229360 --- gcc/ChangeLog | 5 +++++ gcc/match.pd | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2438005dec9..237299e165c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-26 Richard Biener + + * match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c. + ( (X & ~Y) | (~X & Y) -> X ^ Y): Remove redundant :c. + 2015-10-26 Alan Hayward * tree-vect-loop.c (vect_create_epilog_for_reduction): Fix diff --git a/gcc/match.pd b/gcc/match.pd index 00c6e7c1abc..fa927b07f56 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -462,7 +462,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* Fold (A & ~B) - (A & B) into (A ^ B) - B. */ (simplify - (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)) + (minus (bit_and:cs @0 (bit_not @1)) (bit_and:cs @0 @1)) (minus (bit_xor @0 @1) @1)) (simplify (minus (bit_and:s @0 INTEGER_CST@2) (bit_and:s @0 INTEGER_CST@1)) @@ -476,7 +476,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* Simplify (X & ~Y) | (~X & Y) -> X ^ Y. */ (simplify - (bit_ior:c (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1)) + (bit_ior (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1)) (bit_xor @0 @1)) (simplify (bit_ior:c (bit_and @0 INTEGER_CST@2) (bit_and (bit_not @0) INTEGER_CST@1)) -- 2.30.2