OSDN Git Service

[LV] Remove constant restriction for vector phi creation
authorMatthew Simpson <mssimpso@codeaurora.org>
Fri, 17 Feb 2017 16:09:07 +0000 (16:09 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Fri, 17 Feb 2017 16:09:07 +0000 (16:09 +0000)
commit132a62ceffcb8b7e47576ac8c15d1f11e9eaf8ed
tree1a24952c2f9e63ac09bb0dd67e995dff2db0bb94
parentc00b7d61cafcf994c9724bb65956d9c72ff83518
[LV] Remove constant restriction for vector phi creation

We previously only created a vector phi node for an induction variable if its
step had a constant integer type. However, the step actually only needs to be
loop-invariant. We only handle inductions having loop-invariant steps, so this
patch should enable vector phi node creation for all integer induction
variables that will be vectorized.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295456 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/induction-step.ll