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