[SLP]Fix PR62665: compiler crash when trying to access non-existing mask
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 22 May 2023 20:12:45 +0000 (13:12 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 22 May 2023 20:43:25 +0000 (13:43 -0700)
commitae5ff3ca0cd923a9fb2b46701641acab3dd15e4b
tree42ca03b26c87a14277096747f6e001451925767c
parent67cf01bd37273af5041ba07e2c57b55fcbf287cb
[SLP]Fix PR62665: compiler crash when trying to access non-existing mask
element.

Need to check at first if the SubMask element is PoisonMaskElem to avoid
compiler crash.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/poison-element-shuffle.ll [new file with mode: 0644]