diff options
author | Dorit Nuzman <dorit.nuzman@intel.com> | 2017-12-12 08:57:43 +0000 |
---|---|---|
committer | Dorit Nuzman <dorit.nuzman@intel.com> | 2017-12-12 08:57:43 +0000 |
commit | 927b31600e2b582d13a5573d4449e28d94b7713a (patch) | |
tree | 13703942d9da8bf9c47fdde09476c628a63e75c3 /llvm/lib/Transforms/Vectorize | |
parent | 2b964108a07da4718354af675138aa0ccd0e1a1f (diff) | |
download | bcm5719-llvm-927b31600e2b582d13a5573d4449e28d94b7713a.tar.gz bcm5719-llvm-927b31600e2b582d13a5573d4449e28d94b7713a.zip |
[LV] Ignore the cost of values that will not appear in the vectorized loop
VecValuesToIgnore holds values that will not appear in the vectorized loop.
We should therefore ignore their cost when VF > 1.
Differential Revision: https://reviews.llvm.org/D40883
llvm-svn: 320463
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index c5d62d0b97d..440641bd91c 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -6877,7 +6877,8 @@ LoopVectorizationCostModel::expectedCost(unsigned VF) { continue; // Skip ignored values. - if (ValuesToIgnore.count(&I)) + if (ValuesToIgnore.count(&I) || + (VF > 1 && VecValuesToIgnore.count(&I))) continue; VectorizationCostTy C = getInstructionCost(&I, VF); |