OSDN Git Service

[LV] Exclude loop-invariant inputs from scalar cost computation.
authorFlorian Hahn <flo@fhahn.com>
Sun, 14 Jul 2019 20:12:36 +0000 (20:12 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sun, 14 Jul 2019 20:12:36 +0000 (20:12 +0000)
commit3748d783e0a58d57fb6a64de4df6eb60f0a33637
tree223cd4fa8f3eac42b211d7e1c9d3047f9e3c9a7f
parent44a57d296910dae6d17888a1bf915e477ba2bdf8
[LV] Exclude loop-invariant inputs from scalar cost computation.

Loop invariant operands do not need to be scalarized, as we are using
the values outside the loop. We should ignore them when computing the
scalarization overhead.

Fixes PR41294

Reviewers: hsaito, rengolin, dcaballe, Ayal

Reviewed By: Ayal

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

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