Reapply r298620: [LV] Vectorize GEPs
authorMatthew Simpson <mssimpso@codeaurora.org>
Fri, 7 Apr 2017 14:15:34 +0000 (14:15 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Fri, 7 Apr 2017 14:15:34 +0000 (14:15 +0000)
commit11fe2e9f2b787646bbb4c5e8dc7698abf79761ce
tree2f95deeb422bd8f1f77691c001cc2b75face0805
parent9f6a5cd91d3acf3393b0bc8a2f40bc099718129e
Reapply r298620: [LV] Vectorize GEPs

This patch reapplies r298620. The original patch was reverted because of two
issues. First, the patch exposed a bug in InstCombine that caused the Chromium
builds to fail (PR32414). This issue was fixed in r299017. Second, the patch
introduced a bug in the vectorizer's scalars analysis that caused test suite
builds to fail on SystemZ. The scalars analysis was too aggressive and marked a
memory instruction scalar, even though it was going to be vectorized. This
issue has been fixed in the current patch and several new test cases for the
scalars analysis have been added.

llvm-svn: 299770
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/consecutive-ptr-uniforms.ll
llvm/test/Transforms/LoopVectorize/X86/scatter_crash.ll
llvm/test/Transforms/LoopVectorize/loop-scalars.ll [new file with mode: 0644]
llvm/test/Transforms/LoopVectorize/vector-geps.ll [new file with mode: 0644]