[SLP]Improve vectorization of PHI instructions.
authorAlexey Bataev <a.bataev@outlook.com>
Wed, 26 May 2021 18:56:22 +0000 (11:56 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 21 Jun 2021 19:26:24 +0000 (12:26 -0700)
commit908b7536615ee8694d949b60716833893c7f7049
tree63960d09b1ac28ce91ce39ab54f3727f7f3d1585
parent5780611d7e044ef56c4214df2c236ef5e15545ab
[SLP]Improve vectorization of PHI instructions.

Perform better analysis when trying to vectorize PHIs.
1. Do not try to vectorize vector PHIs.
2. Do deeper analysis for more profitable nodes for the vectorization.

Before we just tried to vectorize the PHIs of the same type. Patch
improves this and tries to vectorize PHIs with incoming values which
come from the same basic block, have the same and/or alternative
opcodes.

It allows to save the compile time and provides better vectorization
results in general.

Part of D57059.

Differential Revision: https://reviews.llvm.org/D103638
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/slp-max-phi-size.ll