[PATCH] D48754: recognize more abs pattern

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 06:04:59 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D48754#1151712, @shchenz wrote:

> @spatel  Hi Sanjay, thanks for your comments. After investigation, I split this task into three parts:
>  1: find more abs pattern in matchSelectPattern and do canonicalization for abs/nabs pattern. (cmp + select). This is what this patch doing.
>  2: recognize ISD::ABS in selectionDAGBuilder to leverage platform abs instruction. (https://bugs.llvm.org/show_bug.cgi?id=36036). This will be done in next patch.
>  3: if no platform abs instructions, recognize canonicalized abs pattern (cmp + select) to shift + add + xor in DAGCombiner. This will be done in third patch.
>
> What do you think about above proposal? And could you please help to do another review for this patch? Thanks.


Yes, this sounds like a good plan to me.


https://reviews.llvm.org/D48754





More information about the llvm-commits mailing list