[SLP]Disable scheduling of insertelements.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 10 Jun 2021 12:15:27 +0000 (05:15 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 10 Jun 2021 17:25:26 +0000 (10:25 -0700)
commita893b441873d4dd0ba849a722797f40da8600c39
tree5a74e4c7b35d6890db99cf4a5df67f699c7e9b15
parenta0bd24453b14d04666ed29f856387ead5c87205b
[SLP]Disable scheduling of insertelements.

There is no need to schedule insertelement instructions. The compiler
did not schedule them before it started support their vectorization and
it should not do it after. We pre-schedule them manually when finding
a build vector sequence.
Disabling scheduling of insertelement instructions improves compile
time and vectorization of the very large basic blocks by saving
scheduling budget for other instructions.

Differential Revision: https://reviews.llvm.org/D104026
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll