[SLP]Fix PR43799: Crash on different sizes of GEP indices.
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 30 Oct 2019 16:51:58 +0000 (12:51 -0400)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 4 Nov 2019 15:36:26 +0000 (10:36 -0500)
commitb80c41cd3c095c8c4fa739130b560b15bda4bbd0
treeaeb8f054edeea8209f818b1d49194311b9036028
parent9ad9d1531b96242bedce3e7f101689bc46322fd2
[SLP]Fix PR43799: Crash on different sizes of GEP indices.

Summary:
If the GEP instructions are going to be vectorized, the indices in those
GEP instructions must be of the same type. Otherwise, the compiler may
crash when trying to build the vector constant.

Reviewers: RKSimon, spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69627
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/crash_gep.ll