This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/4] match.pd: Add x | ~(x | y) -> x | ~y pattern
- From: Marek Polacek <polacek at redhat dot com>
- To: Rasmus Villemoes <rv at rasmusvillemoes dot dk>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Andrew Pinski <pinskia at gmail dot com>
- Date: Wed, 21 Jan 2015 11:58:22 +0100
- Subject: Re: [PATCH 3/4] match.pd: Add x | ~(x | y) -> x | ~y pattern
- Authentication-results: sourceware.org; auth=none
- References: <CAFiYyc3mduvq1xqLuj4zZ93Rf2PjbQqxF36Rj8nodAwAMHe9ig at mail dot gmail dot com> <1421837394-7619-1-git-send-email-rv at rasmusvillemoes dot dk> <1421837394-7619-4-git-send-email-rv at rasmusvillemoes dot dk>
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.
Marek