Fix sign compare warning. Patch by Mahesha HS.
authorChandler Carruth <chandlerc@gmail.com>
Fri, 2 Nov 2012 05:24:00 +0000 (05:24 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 2 Nov 2012 05:24:00 +0000 (05:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167282 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/LoopVectorize.cpp

index c9871e25f12997c7c74e9fa35de2f84f5d6abfa2..892808760f76574b3a6e5159049a651c2568e127 100644 (file)
@@ -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 {
 
@@ -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;