[PATCH] D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 08:09:30 PDT 2019


ABataev added a comment.

In D66095#1631495 <https://reviews.llvm.org/D66095#1631495>, @spatel wrote:

> In D66095#1630408 <https://reviews.llvm.org/D66095#1630408>, @ABataev wrote:
>
> > What about very long vectors that do no fit into single register? Is it cost effective for such vectors too?
>
>
> We would split the long vectors into values that fit the target registers in the backend. At that point, the target can decide if N vector selects are better or worse than a transfer to scalar compare and branch. As @lebedev.ri mentioned, we're missing that logic in SDAG, but given that this transform produces the better code for the default case, I don't think we need to make this patch dependent on backend fixups.


But it adds extra cost for vectors splitting. Maybe limit the size of the vectors in the patch?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66095/new/

https://reviews.llvm.org/D66095





More information about the llvm-commits mailing list