[SLP]Delay vectorization of postponable values for instructions with no users.
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 15 Aug 2022 17:26:45 +0000 (10:26 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Fri, 19 Aug 2022 15:39:16 +0000 (08:39 -0700)
commitc16702868485f157f60cd34ac64c5dd5db456d47
tree35b94481a8e13b128ec321933d3b2ce4d015310a
parent7799b5c0e6ea2cdc5b5123a1f875bc895c9137a6
[SLP]Delay vectorization of postponable values for instructions with no users.

SLP vectorizer tries to find the reductions starting the operands of the
instructions with no-users/void returns/etc. But such operands can be
postponable instructions, like Cmp, InsertElement or InsertValue. Such
operands still must be postponed, vectorizer should not try to vectorize
them immediately.

Differential Revision: https://reviews.llvm.org/D131965
llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
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
llvm/test/Transforms/SLPVectorizer/X86/insertelement-postpone.ll
llvm/test/Transforms/SLPVectorizer/X86/pr48879-sroa.ll