[polly] [ScopInfo] Don't use isl_val_get_num_si.
commit7bdf7600114305ab98cd6b2e230a75b5eb93734f
authorEli Friedman <efriedma@codeaurora.org>
Wed, 17 Jan 2018 21:59:02 +0000 (17 21:59 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 17 Jan 2018 21:59:02 +0000 (17 21:59 +0000)
tree6a27f5d4ae930cd24aedd9be2fb08ee31a3387c3
parent07bc377b856fe9a4f65bb459320a0da355ede121
[polly] [ScopInfo] Don't use isl_val_get_num_si.

isl_val_get_num_si crashes on overflow, so don't use it on arbitrary
integers.

Testcase only crashes on platforms where long is 32 bits because of the
signature of isl_val_get_num_si; not sure if it's possible to write a
testcase which crashes if long is 64 bits.

There are a few other places in polly which use isl_val_get_num_si;
they probably need to be fixed as well. I don't think polly uses any
of the other "long" isl APIs in an unsafe manner.

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

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@322766 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScopInfo.cpp
test/ScopInfo/multidim_fold_constant_dim.ll