[SLP]Fix a crash when trying to cast scalable vector type to fixed.
authorAlexey Bataev <a.bataev@outlook.com>
Wed, 19 Jul 2023 18:20:39 +0000 (11:20 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Wed, 19 Jul 2023 18:53:49 +0000 (11:53 -0700)
commitaae2eaae2cefd3132059925c4592276defdb1faa
tree5cdfd1a59922bf458c4e1f33dcf65a7ab4b38c5f
parenta290db3af14d8eb792e72555832c342f85b9579b
[SLP]Fix a crash when trying to cast scalable vector type to fixed.

Need to check for FixedVectorType, not a vector type, since later
compiler performs unconditional cast to FixedVectorType and gets the
number of elements in this type.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/RISCV/scalable-type-to-vect.ll [new file with mode: 0644]