[PATCH] D146564: [SLP]Find reused scalars in buildvector sequences, if any.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 14:11:19 PDT 2023


ABataev created this revision.
ABataev added reviewers: RKSimon, vdmitrie.
Herald added subscribers: nlopes, vporpo, hiraditya.
Herald added a project: All.
ABataev requested review of this revision.
Herald added a subscriber: pcwang-thead.
Herald added a project: LLVM.

Patch generalizes analysis of scalars. The main part is outlined into
lambda, which can be used to find reused inserted scalars and emit
shuffle for them instead of multiple insertelement instructions, if the
permutation is found alreadyi. I.e. some scalars are transformed by the
permutation of previously vectorized nodes, and some are inserted
directly.

Reworked part of D110978 <https://reviews.llvm.org/D110978>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146564

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/X86/jumbled-load-multiuse.ll
  llvm/test/Transforms/SLPVectorizer/X86/matched-shuffled-entries.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146564.507119.patch
Type: text/x-patch
Size: 13945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/5f4ef806/attachment.bin>


More information about the llvm-commits mailing list