OSDN Git Service

[LV] Process pointer IVs with PHINodes in collectLoopUniforms
authorMatthew Simpson <mssimpso@codeaurora.org>
Wed, 14 Sep 2016 14:47:40 +0000 (14:47 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Wed, 14 Sep 2016 14:47:40 +0000 (14:47 +0000)
commitbe3fec6cf2347af1e9a7b8fdddad9d9b8b72c99b
treeaad19c7d76216b3387736085a9f44f16573b89d5
parentb50cea71501932bd7777c0512de814b11b637cdf
[LV] Process pointer IVs with PHINodes in collectLoopUniforms

This patch moves the processing of pointer induction variables in
collectLoopUniforms from the consecutive pointer phase of the analysis to the
phi node phase. Previously, if a pointer induction variable was used by both a
scalarized non-memory instruction as well as a vectorized memory instruction,
we would incorrectly identify the pointer as uniform. Pointer induction
variables should be treated the same as other phi nodes. That is, they are
uniform if all users of the induction variable and induction variable update
are uniform.

Differential Revision: https://reviews.llvm.org/D24511

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281485 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll