Skip to content

Commit

Permalink
Fix sign compare warning. Patch by Mahesha HS.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167282 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Nov 2, 2012
1 parent 875618f commit 6e48f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ VectorizationFactor("force-vector-width", cl::init(0), cl::Hidden,
cl::desc("Set the default vectorization width. Zero is autoselect."));

/// We don't vectorize loops with a known constant trip count below this number.
const int TinyTripCountThreshold = 16;
const unsigned TinyTripCountThreshold = 16;

namespace {

Expand Down Expand Up @@ -1161,7 +1161,7 @@ bool LoopVectorizationLegality::canVectorize() {

// Do not loop-vectorize loops with a tiny trip count.
unsigned TC = SE->getSmallConstantTripCount(TheLoop, BB);
if (TC > 0 && TC < TinyTripCountThreshold) {
if (TC > 0u && TC < TinyTripCountThreshold) {
DEBUG(dbgs() << "LV: Found a loop with a very small trip count. " <<
"This loop is not worth vectorizing.\n");
return false;
Expand Down

0 comments on commit 6e48f03

Please sign in to comment.