Davide Italiano 961f725e69 [ConstantFolder] Don't try to fold gep when the idx is a vector.
The code in ConstantFoldGetElementPtr() assumes integers, and
therefore it crashes trying to get the integer bidwith of a vector
type (in this case <4 x i32>. I just changed the code to prevent
the folding in case of vectors and I didn't bother to generalize
as this doesn't seem to me something that really happens in
practice, but I'm willing to change the patch if you think
it's worth it.
This is hard to trigger from -instsimplify or -instcombine
only as the second instruction is dead, so the test uses loop-unroll.

Differential Revision:  https://reviews.llvm.org/D35956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309330 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 22:20:44 +00:00
..
2017-07-12 00:15:53 +00:00
2017-01-28 02:02:38 +00:00
2017-05-18 11:29:41 +00:00