[PATCH][DAG] PR16726: extend rol/ror matching
kai.nacke at redstar.de
Thu Sep 19 12:39:13 PDT 2013
On 15.09.2013 20:00, Kai Nacke wrote:
> On 10.09.2013 01:26, Kai Nacke wrote:
>> 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.
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
More information about the llvm-commits