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

Sean Silva chisophugis at gmail.com
Mon Nov 10 14:53:50 PST 2014


On Fri, Nov 7, 2014 at 10:23 PM, suyog sarda <sardask01 at gmail.com> wrote:

> Hi Sean,
>
> Didn't get the context of your comment (I didn't comment on this thread at
> any point of time :).
> I think you meant Sonam as she has mentioned in this thread that similar
> transformation
> exist in VisitAdd()).
>

Yeah, I meant Sonam. Oops. Sorry about that.



>
> Do you want me to do something on this?
>
> I am of the opinion (after working on similar kind of patches earlier)
> that there can be n number
> of such combinations and there needs to be general combiner for pattern
> (Hence, i stopped submitting
> such patches these days :) ).
>
> As mentioned earlier by you and Daniel in below thread, this can be
> achieved by having a table
> of preferred form of expression (may be tblegen can help in this, not
> sure).
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075843.html
>
>
Yeah, it seems like a table would be more effective. At the LLVM dev
meeting recently I also learned that there are plans to generate
instcombine transformations automatically (alongside SMT code that can be
used to prove their correctness).

-- Sean Silva


>
>
> On Sat, Nov 8, 2014 at 9:31 AM, Sean Silva <chisophugis at gmail.com> wrote:
>
>> Upthread Suyog mentions a "similar" transformation in visitAdd, which was
>> added in r155674 referencing a rdar. I'm not sure how Suyog got from that
>> transformation to this one though (a script? seems difficult to deduce).
>>
>> On Thu, Nov 6, 2014 at 10:54 PM, Anton Korobeynikov <
>> anton at korobeynikov.info> wrote:
>>
>>> The question still applies (and actually is very in-line with Hal's
>>> comments in D5719) - 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
>>>
>>>
>>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
>
> --
> With regards,
> Suyog Sarda
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141110/3c45e61c/attachment.html>


More information about the llvm-commits mailing list