[ScopInfo] Do not try to fold array dimensions of size zero
commit0aa4c5d8e25a24658f54a9c0532bfc657ab7ddfa
authorTobias Grosser <tobias@grosser.es>
Fri, 17 Feb 2017 04:48:52 +0000 (17 04:48 +0000)
committerTobias Grosser <tobias@grosser.es>
Fri, 17 Feb 2017 04:48:52 +0000 (17 04:48 +0000)
treea34a1ca63e8e66cc0d6fafe36d02a005d98efa9a
parent529faa29b25328116539a31a71903c1043591efe
[ScopInfo] Do not try to fold array dimensions of size zero

Trying to fold such kind of dimensions will result in a division by zero,
which crashes the compiler. As such arrays are likely to invalidate the
scop anyhow (but are not illegal in LLVM-IR), there is no point in trying
to optimize the array layout. Hence, we just avoid the folding of
constant dimensions of size zero.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@295415 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScopInfo.cpp
test/ScopInfo/multidim_fold_constant_dim_zero.ll [new file with mode: 0644]