[PATCH] D141512: [SLP]Improve isGatherShuffledEntry by looking deeper through the reused scalars.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 08:33:37 PST 2023


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

The compiler may produce better results if it does not look for
constants, uses an extra analysis of phi nodes, looks through all tree
nodes without skipping the cases, where the very first set of nodes is
empty. Also, it tries to reshufle the nodes if it is profitable for
sure, i.e. at least 2 scalars are used for single node permutation and at
least 3 scalars are used for the permutation of 2 nodes.

Part of D110978 <https://reviews.llvm.org/D110978>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141512

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/horizontal.ll
  llvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
  llvm/test/Transforms/SLPVectorizer/X86/commutativity.ll
  llvm/test/Transforms/SLPVectorizer/X86/crash_netbsd_decompress.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141512.488242.patch
Type: text/x-patch
Size: 26697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230111/5098fb94/attachment.bin>


More information about the llvm-commits mailing list