[PATCH] D47831: [DAGCombiner] Recognize more patterns for ABS
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 6 12:44:19 PDT 2018
spatel added a comment.
In https://reviews.llvm.org/D47831#1124005, @kparzysz wrote:
> In https://reviews.llvm.org/D47831#1123994, @spatel wrote:
>
> > I can't rule it out completely, but that seems very unlikely given that we have a generic ABS node. Some set of smaller DAG transforms would have to unknowingly produce the shift+xor+add/sub instructions independently without realizing it has created the larger ABS node?
>
>
> Yes, that's what I meant. I've seen a similar kind of behavior before (different operations though). I can try to create a testcase that shows that. Is this simply something that we assume could happen and have to live with?
No, if it's likely, then we should have a DAGCombine for it. We want the IR canonicalization regardless of that though, so I'll work on the InstCombine patch.
Repository:
rL LLVM
https://reviews.llvm.org/D47831
More information about the llvm-commits
mailing list