[SLP]Fix crash on casting non-instruction extractelement.
authorAlexey Bataev <a.bataev@outlook.com>
Tue, 3 Jan 2023 16:44:51 +0000 (08:44 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 3 Jan 2023 17:45:57 +0000 (09:45 -0800)
commit26fec4e845a833214d2b0036ea90f1b1c2418d50
treea8d15d9da1d6b55dba46c706e7d39f8dbb2f399c
parentecb85b5cd89f9797c538675ee3ab93e350c57bd5
[SLP]Fix crash on casting non-instruction extractelement.

Need to check if the extractelement operation is an extraction before
trying to move it around the buildblocks to avoid crash on cast.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/external-non-inst-use.ll [new file with mode: 0644]