OSDN Git Service

[LV] Update type in cost model for scalarization
authorMatthew Simpson <mssimpso@codeaurora.org>
Wed, 24 May 2017 15:26:15 +0000 (15:26 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Wed, 24 May 2017 15:26:15 +0000 (15:26 +0000)
commit9e8c6339d72d363e22fd82e5a3f7a97cb907dccf
treee575fbd63851cebecbb95497bb9c81ef7ab13394
parent6f94f45297b698e8c6ec6a9597806215eb8414f6
[LV] Update type in cost model for scalarization

For non-uniform instructions marked for scalarization, we should update
`VectorTy` when computing instruction costs to reflect the scalar type. In
addition to determining instruction costs, this type is also used to signal
that all instructions in the loop will be scalarized. This currently affects
memory instructions and non-pointer induction variables and their updates. (We
also mark GEPs scalar after vectorization, but their cost is computed together
with memory instructions.) For scalarized induction updates, this patch also
scales the scalar cost by the vectorization factor, corresponding to each
induction step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303763 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/AArch64/no_vector_instructions.ll [new file with mode: 0644]