[SLP]Fix delete of the extractelement with users.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 6 Apr 2023 15:20:19 +0000 (08:20 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 6 Apr 2023 16:15:30 +0000 (09:15 -0700)
commitcf62adbbd83e593a893a27234636b939870c9658
treedde00338c847bed4a229eecd8b4856603ccec1ee
parent0437f88b77f67fa11d335b0664d857cf315c8e97
[SLP]Fix delete of the extractelement with users.

Made the condition for the erasing of the gathered extractelements
stricter, remove it only if it has single vectorized use, otherwise
leave it for instcombiner/instsimplify analysis.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/extract-many-users-buildvector.ll [new file with mode: 0644]