This removes the duplication. I also removed the case (A&B)&(A&C) which is handled by reassoc. And I need 2 NOP checks, for the case where @0 is a constant (that couldn't happen before my patch because canonicalization would put the constant as second operand). Bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2016-05-03 Marc Glisse * match.pd ((A | B) & (A | C)): Generalize to BIT_XOR_EXPR. Mark as commutative. Check both conversions are NOP. ((A & B) OP (C & B)): Remove. -- Marc Glisse