[SLP]Adjust assertion check for scalars in several insertelements.
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 9 May 2022 20:06:30 +0000 (13:06 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 9 May 2022 20:07:59 +0000 (13:07 -0700)
commitcce80bd8b74d54deb82b1b6ae0cbec1ab53c1dbb
tree16573d963d8e40370ea81cd9bc76d00c7b7d17b2
parent72831a592edf1bdcca15354181867079a17d4f76
[SLP]Adjust assertion check for scalars in several insertelements.

If the same scalar is inserted several times into the same buildvector,
the mask index can be used already. In this case need to check, that
this scalar is already part of the vectorized buildvector.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/buildvector-shuffle.ll