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

Kai Nacke kai.nacke at redstar.de
Thu Sep 19 12:39:13 PDT 2013


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
>




More information about the llvm-commits mailing list