[PATCH] Added a new transformation " (sub (or A, B) (and A, B)) --> (xor A, B) "

Sean Silva chisophugis at gmail.com
Fri Nov 7 19:58:45 PST 2014


On Fri, Nov 7, 2014 at 8:13 AM, Hal Finkel <hfinkel at anl.gov> wrote:

> ----- Original Message -----
> > From: "Anton Korobeynikov" <anton at korobeynikov.info>
> > To: "sonam kumari" <sonam.kumari at samsung.com>, "suyog sarda" <
> suyog.sarda at samsung.com>, "david majnemer"
> > <david.majnemer at gmail.com>, dexonsmith at apple.com, hfinkel at anl.gov
> > Cc: anton at korobeynikov.info, chisophugis at gmail.com,
> llvm-commits at cs.uiuc.edu
> > Sent: Friday, November 7, 2014 12:54:49 AM
> > Subject: Re: [PATCH] Added a new transformation " (sub (or A, B) (and A,
> B)) --> (xor A, B) "
> >
> > The question still applies (and actually is very in-line with Hal's
> > comments in D5719
>
> Just to be clear, I think these (three nodes -> one node) transformations,
> which don't rely on calls to ValueTracking, should all be added (because,
> in my experience working on a superoptimizer, they essentially all happen
> eventually and lacking them leads to surprising behavior in combination
> with other optimizations).
>

Sonam, could you maybe write a script to test all possible 3->1
transformations and see which ones are valid?

-- Sean Silva


>
> However, that having been said, it is a perfectly reasonable question to
> ask what motivated this particular patch? How did you see this? The answer
> to this question might motivate other work, allow us to better understand
> the results of other optimizations, etc. and so I still believe that
> understanding the motivation is important.
>
> Thanks again,
> Hal
>
> >) - you need to provide some evidence that such
> > pattern indeed happens in practice (why it's so hard to count how
> > many times it happens in test-suite? after more than month?). And
> > it's not some random stuff which you simple want to commit in due to
> > some reason you do not want to share with us.
> >
> > http://reviews.llvm.org/D5720
> >
> >
> >
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141107/46c74275/attachment.html>


More information about the llvm-commits mailing list