[llvm] r316161 - Fix MSVC signed/unsigned comparison warning

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 08:00:31 PDT 2017


Author: rksimon
Date: Thu Oct 19 08:00:31 2017
New Revision: 316161

URL: http://llvm.org/viewvc/llvm-project?rev=316161&view=rev
Log:
Fix MSVC signed/unsigned comparison warning

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=316161&r1=316160&r2=316161&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Thu Oct 19 08:00:31 2017
@@ -316,7 +316,7 @@ analyzeLoopUnrollCost(const Loop *L, uns
   // to them without checking for overflows, and we already don't want to
   // analyze *massive* trip counts, so we force the max to be reasonably small.
   assert(UnrollMaxIterationsCountToAnalyze <
-             (std::numeric_limits<int>::max() / 2) &&
+             (unsigned)(std::numeric_limits<int>::max() / 2) &&
          "The unroll iterations max is too large!");
 
   // Only analyze inner loops. We can't properly estimate cost of nested loops




More information about the llvm-commits mailing list