On Mon, 26 Oct 2015, Marc Glisse wrote: > On Mon, 26 Oct 2015, Richard Biener wrote: > > > @@ -435,7 +435,7 @@ (define_operator_list RINT BUILT_IN_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)) > > Sorry, I should have listed them all, but the same applies to > /* Fold (A & B) - (A & ~B) into B - (A ^ B). */ > a few lines below.
Heh. I wonder if we can teach genmatch to auto-annotate commutative operands (detecting the cases where it doesn't get us anything but redundant patterns). Or implement a warning that catches them at least. Anyway, fixed in my local tree, will go out with my next match.pd modification. Richard.