[PATCH][DAG] PR16726: extend rol/ror matching
Owen Anderson
resistor at mac.com
Thu Sep 19 13:08:22 PDT 2013
LGTM.
—Owen
On Sep 19, 2013, at 12:39 PM, Kai Nacke <kai.nacke at redstar.de> wrote:
> Ping^2.
>
> Regards
> Kai
>
> On 15.09.2013 20:00, Kai Nacke wrote:
>> Ping.
>>
>> On 10.09.2013 01:26, Kai Nacke wrote:
>>> Hi!
>>>
>>> C-like languages promote types like unsigned short to unsigned int
>>> before performing an arithmetic operation. The rotate matcher in the
>>> DAGCombiner does not consider this situation.
>>> The attached patch extends the DAGCombiner in the way that the pattern
>>>
>>> (or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))
>>>
>>> is folded into
>>>
>>> ([az]ext (rotl x, y))
>>>
>>> The matching is restricted to aext and zext because in this cases the
>>> upper bits are either undefined or known. Test case is included.
>>>
>>> This fixes PR16726.
>>>
>>> Please review.
>>>
>>> Regards
>>> Kai
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>>
>>
>> _______________________________________________
>> 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/20130919/38653247/attachment.html>
More information about the llvm-commits
mailing list