Fix reuse of non-dominating synthesized value in subregion exit
commitd5543a91ba53b2b40d5e9f99c3412667e41fbf82
authorMichael Kruse <llvm@meinersbur.de>
Fri, 6 Nov 2015 13:51:24 +0000 (6 13:51 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 6 Nov 2015 13:51:24 +0000 (6 13:51 +0000)
treea0dd27d95baabbfbcc29cd2ab590befc15490ad2
parent11dd4a37438d2a044477b1f67218902894d60d18
Fix reuse of non-dominating synthesized value in subregion exit

We were adding all generated values in non-affine subregions to be used
for the subregions generated exit block. The thought was that only
values that are dominating the original exit block can be used there.
But it is possible for synthesizable values to be expanded in any
block. If the same values is also used for implicit writes, it would
try to reuse already synthesized values even if not dominating the exit
block.

The fix is to only add values to the list of values usable in the exit
block only if it is dominating the exit block. This fixes
llvm.org/PR25412.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@252301 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BlockGenerators.cpp
test/Isl/CodeGen/non-affine-synthesized-in-branch.ll [new file with mode: 0644]