[SCEVValidator] Loop exit values of loops before the SCoP are synthesizable.
authorMichael Kruse <llvm@meinersbur.de>
Wed, 26 Jul 2017 13:05:45 +0000 (13:05 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Wed, 26 Jul 2017 13:05:45 +0000 (13:05 +0000)
commit11ed0622583deada30e6a992df2586de0736fa86
treefab51cd15ddc1d8658e49fbf2409b8fb3318d9fa
parent092f19918836e0f12b93f26d1bb5f3d157ba6f4e
[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.

llvm-svn: 309109
polly/lib/Support/SCEVValidator.cpp
polly/test/ScopDetect/index_from_unpredictable_loop.ll
polly/test/ScopDetect/index_from_unpredictable_loop2.ll [new file with mode: 0644]
polly/test/ScopInfo/unpredictable_nonscop_loop.ll [new file with mode: 0644]