[SLP]Fix a crash when trying to shuffle multiple nodes.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 30 Mar 2023 14:36:12 +0000 (07:36 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 30 Mar 2023 16:32:11 +0000 (09:32 -0700)
commit9255124a0713f1fe57e553c4266380a7087a61c6
tree16b76a2fea383a942c5c5f643471344210c3c7a8
parent48f6964bcbfba25e79c301b0175be327cff586d9
[SLP]Fix a crash when trying to shuffle multiple nodes.

Need to transform mask after applying shuffle using the mask itself as
a base to correctly mark with identity those indices, actually used in
previous shuffle. Allows to fix a crash, if different sized vectors are
shuffled.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/shuffle-multiple-nodes.ll [new file with mode: 0644]