[SCEVValidator] Loop exit values of loops before the SCoP are synthesizable.
commit4f7e7863b5e96d2a222596168415378f58284174
authorMichael Kruse <llvm@meinersbur.de>
Wed, 26 Jul 2017 13:05:45 +0000 (26 13:05 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Wed, 26 Jul 2017 13:05:45 +0000 (26 13:05 +0000)
treef7f7573484353bfa533d1eda5a3daddafee226a0
parent3019c7a9da4e7df547aa9310119e9bafeb5fac30
[SCEVValidator] Loop exit values of loops before the SCoP are synthesizable.

 In the following loop:

   int i;
   for (i = 0; i < func(); i+=1)
     ;
SCoP:
   for (int j = 0; j<n; j+=1)
     S(i, j)

The value i is synthesizable in the SCoP that includes only the j-loop.
This is because i is fixed within the SCoP, it is irrelevant whether
it originates from another loop.

This fixes a strange case where a PHI was synthesiable in a SCoP,
but not its incoming value, triggering an assertion.

This should fix MultiSource/Applications/sgefa/sgefa of the
perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@309109 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/SCEVValidator.cpp
test/ScopDetect/index_from_unpredictable_loop.ll
test/ScopDetect/index_from_unpredictable_loop2.ll [copied from test/ScopDetect/index_from_unpredictable_loop.ll with 65% similarity]
test/ScopInfo/unpredictable_nonscop_loop.ll [new file with mode: 0644]