[ScopInfo] Fix check for element size mismatch.
authorMichael Kruse <llvm@meinersbur.de>
Fri, 8 Apr 2016 16:20:08 +0000 (16:20 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 8 Apr 2016 16:20:08 +0000 (16:20 +0000)
commit436c90619c16bd8a7466b0105fa087c7147373c2
tree00a14d551b49a653a636cd5ad67fb64d10625cf9
parenta15fb15b0581ec6a187cceb677755800ba2fb58c
[ScopInfo] Fix check for element size mismatch.

The way to get the elements size with getPrimitiveSizeInBits() is not
the same as used in other parts of Polly which should use
DataLayout::getTypeAllocSize(). Its use only queries the size of the
pointer and getPrimitiveSizeInBits returns 0 for types that require a
DataLayout object such as pointers.

Together with r265379, this should fix PR27195.

llvm-svn: 265795
polly/lib/Analysis/ScopInfo.cpp
polly/test/ScopInfo/multidim_gep_pointercast.ll [new file with mode: 0644]