[SLP] Do not ignore ordering for root node when it has in-tree uses.
authorValery N Dmitriev <valery.n.dmitriev@intel.com>
Sat, 7 Jan 2023 03:42:13 +0000 (19:42 -0800)
committerValery N Dmitriev <valery.n.dmitriev@intel.com>
Tue, 10 Jan 2023 18:12:51 +0000 (10:12 -0800)
commitfd7273359a33647b79df93d82a12a3ac6d589348
tree80d3221cd6a997b8240c39be12f778fa4a46bc7b
parentc4ce1e0131aa04cec4803740c3c203c7f000e837
[SLP] Do not ignore ordering for root node when it has in-tree uses.

When rooted with PHIs, a vectorization tree may have another node with PHIs
which have roots as their operands. We cannot ignore ordering information
for root in such a case.

Differential Revision: https://reviews.llvm.org/D141309
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/reorder-phi-operand.ll