summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorZinovy Nis <zinovy.nis@gmail.com>2014-04-29 09:45:08 +0000
committerZinovy Nis <zinovy.nis@gmail.com>2014-04-29 09:45:08 +0000
commit487268574acae7d674afa9525105ae51b6210745 (patch)
treea04cb9946525dde9ae6b57405be039bbcc96d5bf /llvm/lib/Transforms/Vectorize
parente1ab3f062e271d848bce33aa1090c0ea40f298d6 (diff)
downloadbcm5719-llvm-487268574acae7d674afa9525105ae51b6210745.tar.gz
bcm5719-llvm-487268574acae7d674afa9525105ae51b6210745.zip
[BUG] Fix -Wunused-variable warning in Release mode. Thnx to Kostya Serebryany for pointing.
llvm-svn: 207516
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 5f27079a96d..cf210d679d8 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud