Ping 2: [PATCH] DAGCombiner: Recognise rotates by X+C

Kay Tiong Khoo kkhoo at perfwizard.com
Tue Jan 7 09:46:15 PST 2014


Sorry, for the delay. I can take a look at the patches this week, but Evan
is certainly more qualified to review this. I'd like to see x86 test cases
in addition to the SystemZ ones, and I can work on that.

I've also cc'd Kai who did some work on this logic for:
http://llvm.org/bugs/show_bug.cgi?id=16726

I think that bug should be reopened? Kai's changes were reverted for:
http://llvm.org/bugs/show_bug.cgi?id=17975

And so we should also mark that bug as resolved I think...



On Thu, Jan 2, 2014 at 12:23 PM, Eric Christopher <echristo at gmail.com>wrote:

> Evan is probably a good choice for reviewer here.
>
> -eric
>
>
> On Thu Jan 02 2014 at 4:02:14 AM, Richard Sandiford <
> rsandifo at linux.vnet.ibm.com> wrote:
>
>> Ping
>> Richard Sandiford <rsandifo at linux.vnet.ibm.com> writes:
>> > Kay Tiong Khoo <kkhoo at perfwizard.com> writes:
>> >> Hi Richard,
>> >>
>> >> Could this patch be enhanced to recognize this case too:
>> >> http://llvm.org/bugs/show_bug.cgi?id=17332#c12
>> >>
>> >> Maybe it already does? Sorry, I can't test it myself at the moment.
>> >
>> > Hi, thanks for the pointer.  The patch didn't handle that case but I
>> agree
>> > it'd be a good thing to add.
>> >
>> > Here's a version that does both.  I've split it into three patches:
>> >
>> > (1) is just a refactoring exercise.  It's easier to make changes to this
>> >     code if there's only one copy of it.  No behavioural change
>> intended.
>> >
>> > (2) is my original patch adjusted for (1).  E.g. we now recognise:
>> >        (or (shl X, (add Y, 10)), (shr X, (sub 22, Y)))
>> >     as a rotate by Y + 10.
>> >
>> > (3) also handles cases where the shift amount is ANDed.  E.g. we now
>> >     recognise:
>> >        (or (shl X, Y), (shr X, (and (sub 0, Y), 31)))
>> >        (or (shl X, Y), (shr X, (and (sub 32, Y), 31)))
>> >     as rotates by Y.  We can also handle redundant ANDs for (2) too:
>> >        (or (shl X, (add Y, 10)), (shr X, (and (sub 22, Y), 31)))
>> >
>> > OK to commit?
>> >
>> > Thanks,
>> > Richard
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140107/f80879d4/attachment.html>


More information about the llvm-commits mailing list