[PATCH] D62024: [InstCombine] fold shuffles of insert_subvectors

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 07:31:05 PDT 2019


spatel updated this revision to Diff 200041.
spatel added a comment.

Revised documentation text: tried to make this backend-centric by specifying the mapping from IR to SDAG opcodes.

> Also, which of those categories does the proposed transform fall under?

This transform relies on expanding the shuffle of narrowed operands back to:
shuffle_vector (insert_subvector undef, X, 0), (insert_subvector undef, Y, 0), Mask'

Here, I'm assuming insertion into 'undef' rather than an arbitrary base vector, so it's an easier operation to support than what I wrote in this rev of the doc text. I'm not sure yet if inserting at index 0 into an arbitrary vector is actually handled well enough by all targets, but that seems like a common enough vector op? It's a fuzzy spec because it can change as we add DAGCombiner rules.


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

https://reviews.llvm.org/D62024

Files:
  llvm/docs/CodeGenerator.rst
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/test/Transforms/InstCombine/vec_shuffle.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62024.200041.patch
Type: text/x-patch
Size: 7710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190517/a801766f/attachment.bin>


More information about the llvm-commits mailing list