[SLP]Improve/fix reordering of the gathered graph nodes.
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 25 Oct 2021 14:32:35 +0000 (07:32 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 28 Oct 2021 12:45:09 +0000 (05:45 -0700)
commit07ef9f513f247f6ceb14d72b8218401e070d450d
tree98281132d676ba94ee65f77b41de09e9ed1be115
parent4d2765e9949f3113799527db265cd2fa1994a05e
[SLP]Improve/fix reordering of the gathered graph nodes.

Gathered loads/extractelements/extractvalue instructions should be
checked if they can represent a vector reordering node too and their
order should ve taken into account for better graph reordering analysis/
Also, if the gather node has reused scalars, they must be reordered
instead of the scalars themselves.

Differential Revision: https://reviews.llvm.org/D112454
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll
llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll