OSDN Git Service

Fix MSVC signed/unsigned comparison warning
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Oct 2017 15:00:31 +0000 (15:00 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Oct 2017 15:00:31 +0000 (15:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316161 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopUnrollPass.cpp

index a15a12d..7b1d644 100644 (file)
@@ -316,7 +316,7 @@ analyzeLoopUnrollCost(const Loop *L, unsigned TripCount, DominatorTree &DT,
   // 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