Hello, this patch replaces some tree_nop_conversion_p tests with less restrictive conditions. In some cases I checked the transformation automatically (of course I could have messed up the checker, or the translation). I didn't always put the laxest possible check. For instance the transformation for (~x & ~y) is valid with sign extension, but the gain is less obvious in that case. ~(~X >> Y) also seems valid in some odd cases involving boolean types, not worth the complication. The bad case for a * (1 << b) is when 1< gcc/ * match.pd (a * (1 << b), ~x & ~y, ~X ^ ~Y, (X ^ Y) ^ Y, ~ (-A), ~ (A - 1), ~(~X >> Y), ~(~X >>r Y)): Relax constraints. gcc/testsuite/ * gcc.dg/fold-notshift-2.c: Adjust. -- Marc Glisse