[SLP]Improve vectorization of phi nodes by trying wider vectors.
authorAlexey Bataev <a.bataev@outlook.com>
Wed, 25 Aug 2021 22:38:36 +0000 (15:38 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 28 Sep 2021 14:20:36 +0000 (07:20 -0700)
commitf701505c45c708338202532f0f14af55b5509794
treeb11f8a06a4a8b9b6703c7f0389bb128d26f149ea
parent0ea77502e22115dca6bcf82f895072ec67f3d565
[SLP]Improve vectorization of phi nodes by trying wider vectors.

Try to improve vectorization of the PHI nodes by trying to vectorize
similar instructions at the size of the widest possible vectors, then
aggregating with compatible type PHIs and trying to vectoriza again and
only if this failed, try smaller sizes of the vector factors for
compatible PHI nodes. This restores performance of several benchmarks
after tuning of the fp/int conversion instructions costs.

Differential Revision: https://reviews.llvm.org/D108740
llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/vectorize-widest-phis.ll