[PATCH] D48754: recognize more abs pattern

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 06:00:28 PDT 2018


spatel added a subscriber: RKSimon.
spatel added a comment.

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

> @spatel Hi Sanjay, thanks for your comments. I will look into it.


Thanks - here are recent patches for abs IR canonicalization:
https://reviews.llvm.org/D47076
https://reviews.llvm.org/rL334137

...so you want modify/add the pattern that has a 'sub' with something similar. We haven't made ValueTracking changes corresponding to those (but probably should). There's also an open question about creating ISD::ABS nodes directly in SelectionDAGBuilder. I think it's just an oversight that we use matchSelectPattern to create min/max there, but not abs.


https://reviews.llvm.org/D48754





More information about the llvm-commits mailing list