[PATCH 3/4] match.pd: Add x | ~(x | y) - x | ~y pattern

2015-01-21 Thread Rasmus Villemoes
gcc.dg/20150120-3.c: New test This is simply the 'dual' of the previous pattern, added for completeness. Signed-off-by: Rasmus Villemoes r...@rasmusvillemoes.dk --- gcc/match.pd | 6 ++ gcc/testsuite/gcc.dg/20150120-3.c | 32 2 files

Re: [PATCH 3/4] match.pd: Add x | ~(x | y) - x | ~y pattern

2015-01-21 Thread Marek Polacek
On Wed, Jan 21, 2015 at 11:49:53AM +0100, Rasmus Villemoes wrote: gcc.dg/20150120-3.c: New test This is simply the 'dual' of the previous pattern, added for completeness. If this is dual, I think you could make use of (for op (bit_ior bit_and) ... and do the simplification in one hunk.