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

Hal Finkel hfinkel at anl.gov
Fri Nov 7 08:13:41 PST 2014


----- 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).

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



More information about the llvm-commits mailing list