[BlockGenerator] Fix PHI merges for MK_Arrays.
authorMichael Kruse <llvm@meinersbur.de>
Thu, 3 Mar 2016 17:20:43 +0000 (17:20 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Thu, 3 Mar 2016 17:20:43 +0000 (17:20 +0000)
commitfaedfcbf6db7739bea35108b0b850490366145e3
treea4bf9c42382ce4d2b1aab28f37b8bf512cd8fa0d
parent0ce261d052c83800b37de1b51e82e4ee139734f0
[BlockGenerator] Fix PHI merges for MK_Arrays.

Value merging is only necessary for scalars when they are used outside
of the scop. While an array's base pointer can be used after the scop,
it gets an extra ScopArrayInfo of type MK_Value. We used to generate
phi's for both of them, where one was assuming the reault of the other
phi would be the original value, because it has already been replaced by
the previous phi. This resulted in IR that the current IR verifier
allows, but is probably illegal.

This reduces the number of LNT test-suite fails with
-polly-position=before-vectorizer -polly-process-unprofitable
from 16 to 10.

Also see llvm.org/PR26718.

llvm-svn: 262629
polly/include/polly/ScopInfo.h
polly/lib/CodeGen/BlockGenerators.cpp
polly/test/Isl/CodeGen/multiple_sai_fro_same_base_address.ll [new file with mode: 0644]