[SLP]Try to vectorize tiny trees with shuffled gathers.
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 26 Apr 2021 15:02:06 +0000 (08:02 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Wed, 28 Apr 2021 13:35:31 +0000 (06:35 -0700)
commit8af4723c5819e1c20c423987cd560d6f981b3d5c
tree067a40e64e02ab2131d3a2d3ee7e08205f715910
parentaee44fcd348b3841210fead04ba83ea7b0bd663a
[SLP]Try to vectorize tiny trees with shuffled gathers.

If the first tree element is vectorize and the second is gather, it
still might be profitable to vectorize it if the gather node contains
less scalars to vectorize than the original tree node. It might be
profitable to use shuffles.

Differential Revision: https://reviews.llvm.org/D101397
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/tiny-tree.ll