Matthew Simpson 8fa16f95ff Reapply r257800 with fix
The fix uniques the bundle of getelementptr indices we are about to vectorize
since it's possible for the same index to be used by multiple instructions.
The original commit message is below.

[SLP] Vectorize the index computations of getelementptr instructions.

This patch seeds the SLP vectorizer with getelementptr indices. The primary
motivation in doing so is to vectorize gather-like idioms beginning with
consecutive loads (e.g., g[a[0] - b[0]] + g[a[1] - b[1]] + ...). While these
cases could be vectorized with a top-down phase, seeding the existing bottom-up
phase with the index computations avoids the complexity, compile-time, and
phase ordering issues associated with a full top-down pass. Only bundles of
single-index getelementptrs with non-constant differences are considered for
vectorization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257918 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 18:51:51 +00:00
..
2015-12-18 23:46:42 +00:00
2016-01-15 18:31:29 +00:00
2016-01-15 18:51:51 +00:00