diff options
author | Zinovy Nis <zinovy.nis@gmail.com> | 2014-04-29 09:45:08 +0000 |
---|---|---|
committer | Zinovy Nis <zinovy.nis@gmail.com> | 2014-04-29 09:45:08 +0000 |
commit | 0f79399dee6627f8dfaa19cdc642320cb2abb67d (patch) | |
tree | 3e1ae7ec4788aa02b83e1f1ddaf4325b58378b26 /lib | |
parent | 43705683fde4d34af41684ff2b622d8b9cc9c0d3 (diff) | |
download | llvm-0f79399dee6627f8dfaa19cdc642320cb2abb67d.tar.gz llvm-0f79399dee6627f8dfaa19cdc642320cb2abb67d.tar.bz2 llvm-0f79399dee6627f8dfaa19cdc642320cb2abb67d.tar.xz |
[BUG] Fix -Wunused-variable warning in Release mode. Thnx to Kostya Serebryany for pointing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 5f27079a96..cf210d679d 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5096,9 +5096,11 @@ LoopVectorizationCostModel::selectVectorizationFactor(bool OptForSize, } float Cost = expectedCost(1); +#ifndef NDEBUG const float ScalarCost = Cost; +#endif /* NDEBUG */ unsigned Width = 1; - DEBUG(dbgs() << "LV: Scalar loop costs: " << (int)Cost << ".\n"); + DEBUG(dbgs() << "LV: Scalar loop costs: " << (int)ScalarCost << ".\n"); // Ignore scalar width, because the user explicitly wants vectorization. if (ForceVectorization && VF > 1) { @@ -5122,7 +5124,6 @@ LoopVectorizationCostModel::selectVectorizationFactor(bool OptForSize, DEBUG(if (ForceVectorization && Width > 1 && Cost >= ScalarCost) dbgs() << "LV: Vectorization seems to be not beneficial, " << "but was forced by a user.\n"); - (void)ScalarCost; DEBUG(dbgs() << "LV: Selecting VF: "<< Width << ".\n"); Factor.Width = Width; Factor.Cost = Width * Cost; |