[PATCH][DAG] PR16726: extend rol/ror matching

Kai Nacke kai.nacke at redstar.de
Thu Sep 19 15:40:05 PDT 2013


Thanks. Committed in r191045.

Regards
Kai

On 19.09.2013 22:08, Owen Anderson wrote:
> LGTM.
>
> —Owen
>
> On Sep 19, 2013, at 12:39 PM, Kai Nacke <kai.nacke at redstar.de
> <mailto: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 <mailto: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 <mailto: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
>




More information about the llvm-commits mailing list