Hi, Please find attached the patch that moves some more patterns from fold-const using simplify and match. Please review the patch and let me know if any modifications are required. Tested the patch on X86 without any regressions. Thanks, Naveen ChangeLog 2015-10-07 Naveen H.S * fold-const.c (fold_binary_loc) : Move X + (X / CST) * -CST -> X % CST to match.pd. Move Fold (A & ~B) - (A & B) into (A ^ B) - B to match.pd. Move (-A) * (-B) -> A * B to match.pd. Move (a * (1 << b)) is (a << b) to match.pd. Move convert (C1/X)*C2 into (C1*C2)/X to match.pd. Move (X & ~Y) | (~X & Y) is X ^ Y to match.pd. Move ~X & X, (X == 0) & X, and !X & X are zero to match.pd. Move X & ~X , X & (X == 0), and X & !X are zero to match.pd. Move Fold X & (X ^ Y) as X & ~Y to match.pd. Move Fold X & (Y ^ X) as ~Y & X to match.pd. * match.pd (plus @0 (mult:s (trunc_div:s @0 INTEGER_CST@1) (negate @1))): New simplifier. (minus (bit_and:s @0 (bit_not:s @1)) (bit_and:s @0 @1)) : New simplifier. (mult:c @0 (lshift integer_onep@1 @2)): New simplifier. (mult:c (plus @0 @0) INTEGER_CST@1): New simplifier. (mult (rdiv REAL_CST@0 @1) REAL_CST@2): New simplifier. (bit_ior (bit_and:s @0 (bit_not:s @1)) (bit_and:s (bit_not:s @0) @1)) : New simplifier. (bit_and:c @0 (bit_not:s @0)): New simplifier. (bit_and:c @0 (eq @0 integer_zerop@1)): New simplifier. (bit_and @0 (bit_xor:s @0 @1)): New simplifier. (bit_and @0 (bit_xor:s @1 @0)): New simplifier. (mult:c (negate @0) (negate @1)): New simplifier.