[llvm-commits] [llvm] r167282 - /llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp

Chandler Carruth chandlerc at gmail.com
Thu Nov 1 22:24:00 PDT 2012


Author: chandlerc
Date: Fri Nov  2 00:24:00 2012
New Revision: 167282

URL: http://llvm.org/viewvc/llvm-project?rev=167282&view=rev
Log:
Fix sign compare warning. Patch by Mahesha HS.

Modified:
    llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp

Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=167282&r1=167281&r2=167282&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Fri Nov  2 00:24:00 2012
@@ -76,7 +76,7 @@
           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 @@
 
   // 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;





More information about the llvm-commits mailing list