[SLP]Fix a crash in gathered loads analysis.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 29 Jul 2021 12:05:29 +0000 (05:05 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Fri, 30 Jul 2021 12:19:17 +0000 (05:19 -0700)
commitc2deb2afafee991c06cc96dc5beecb6de448b9fc
tree3a1064e5b5f4f3def57c19d307a5ac6a76d1abb0
parentaa426c372c71901df64d7bb2f61f351e0b9fd048
[SLP]Fix a crash in gathered loads analysis.

Need to check that the minimum acceptable vector factor is at least 2,
not 0, to avoid compiler crash during gathered loads analysis.

Differential Revision: https://reviews.llvm.org/D107058
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/gather-load-min-required-vf-2.ll [new file with mode: 0644]