On Fri, Jun 19, 2020 at 12:37 PM Przemyslaw Wirkus
<przemyslaw.wir...@arm.com> 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 & ~x */

The patch is OK.

Thanks,
Richard.

> > 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 ?
> > >
> > > Cheers,
> > > Przemyslaw
> > >
> > > gcc/ChangeLog:
> > >
> > >     PR tree-optimization/94880
> > >     * match.pd (A | B) - B -> (A & ~B): New simplification.
> > >
> > > gcc/testsuite/ChangeLog:
> > >
> > >     PR tree-optimization/94880
> > >     * gcc.dg/tree-ssa/pr94880.c: New Test.
> > >
> > >
> >
> > --
> > Marc Glisse
>
> --
> Przemyslaw

Reply via email to