[PATCH] D107068: [DAG] DAGCombiner::visitVECTOR_SHUFFLE - recognise INSERT_SUBVECTOR patterns.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 3 07:43:32 PDT 2021


RKSimon added a comment.

In D107068#2922214 <https://reviews.llvm.org/D107068#2922214>, @lebedev.ri wrote:

> What about insertion of multiple subvectors?

Do you have an example? visitINSERT_SUBVECTOR already does some canonicalizations and can fold to CONCAT_VECTORS

> This looks complicated. Can't we do this simpler?
> If we want to keep the current general logic, can't you just generate a shuffle mask that you'd need when inserting n'th subvector of RHS into identity LHS, and compare that the mask matches the actual mask? (modulo `undef`s)

I'll look at this - but an earlier prototype tried something similar and it ended up being rather messy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107068



More information about the llvm-commits mailing list