[PATCH] D45733: [DAGCombiner] Unfold scalar masked merge if profitable

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 10:01:03 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D45733#1071088, @spatel wrote:

> In https://reviews.llvm.org/D45733#1071068, @lebedev.ri wrote:
>
> > I don't think it will be possible to check that until after the instcombine part has landed, so ok, at least for now i will stop unfolding [constant mask] in dagcombine.
> >
> > While there, any hint re pattern matchers for this code?
>
>
> Unfortunately, DAG nodes don't have any equivalent match() infrastructure like IR that I know of.


Boo :(

> The commuted variants are what complicate this?

Yes.

> Usually, I think we just std::swap() our way to the answer here in the DAG.

Hmm, while i can see that working in many simple cases, i'm not sure that will be enough here.


Repository:
  rL LLVM

https://reviews.llvm.org/D45733





More information about the llvm-commits mailing list