OSDN Git Service

[ConstantFolding] Fix vector GEPs harder
authorMichael Kuperstein <mkuper@google.com>
Wed, 21 Dec 2016 17:34:21 +0000 (17:34 +0000)
committerMichael Kuperstein <mkuper@google.com>
Wed, 21 Dec 2016 17:34:21 +0000 (17:34 +0000)
commit57ab82784ddb8d21eb0041d52f8490d8fd404e29
tree3e463d2901d9b0a591a61d65b3c3d365c2dee8f4
parent12220058cff5be55055edf8514b6474ab708594e
[ConstantFolding] Fix vector GEPs harder

For vector GEPs, CastGEPIndices can end up in an infinite recursion, because
we compare the vector type to the scalar pointer type, find them different,
and then try to cast a type to itself.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290260 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ConstantFolding.cpp
test/Analysis/ConstantFolding/vectorgep-crash.ll