RE: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-19 Thread Alex Coplan
> -Original Message- > From: Gcc-patches On Behalf Of Przemyslaw > Wirkus > Sent: 19 June 2020 15:06 > To: Richard Biener > Cc: gcc-patches@gcc.gnu.org; Marc Glisse > Subject: RE: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern > > > Fro

RE: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-19 Thread Przemyslaw Wirkus
> From: Richard Biener > Subject: Re: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn > pattern Snip... > The patch is OK. I do not have write access yet. Can I ask someone to push my patch to master please ? Thanks in advance, Przemyslaw > Thanks, > Richard. &

Re: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-19 Thread Richard Biener via Gcc-patches
On Fri, Jun 19, 2020 at 12:37 PM Przemyslaw Wirkus wrote: > > > On Fri, Jun 19 2020 Marc Glisse wrote: > > (not a reviewer) > > > > It looks fine to me. Do we already handle the related (x|y)^y and (x|y)&~y ? > > These are already in match.pd: > > /* (X | Y) ^ X -> Y & ~ X*/ > /* (x | y) & ~x -> y

RE: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-19 Thread Przemyslaw Wirkus
On Fri, Jun 19 2020 Marc Glisse wrote: > (not a reviewer) > > It looks fine to me. Do we already handle the related (x|y)^y and (x|y)&~y ? These are already in match.pd: /* (X | Y) ^ X -> Y & ~ X*/ /* (x | y) & ~x -> y & ~x */ > On Fri, 19 Jun 2020, Przemyslaw Wirkus wrote: > > > Hi all, >

RE: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-19 Thread Marc Glisse
(not a reviewer) It looks fine to me. Do we already handle the related (x|y)^y and (x|y)&~y ? On Fri, 19 Jun 2020, Przemyslaw Wirkus wrote: Hi all, Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. Bootstrapped and tested on aarch64-none-linux-gnu. OK for master ? C

RE: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-19 Thread Przemyslaw Wirkus
Hi all, Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. Bootstrapped and tested on aarch64-none-linux-gnu. OK for master ? Cheers, Przemyslaw gcc/ChangeLog: PR tree-optimization/94880 * match.pd (A | B) - B -> (A & ~B): New simplification. gcc/testsu

Re: [PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-17 Thread Marc Glisse
(It would be nice to convince your mailer that a patch is not just Application/OCTET-STREAM) Aren't you missing :cs on bit_ior? On Wed, 17 Jun 2020, Przemyslaw Wirkus wrote: Hi, Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. Bootstrapped and tested on aarch64-none