[llvm] r310029 - Avoid comparison between signed and unsigned in SCEVExitLimitForget tests

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 23:03:51 PDT 2017


Author: mkazantsev
Date: Thu Aug  3 23:03:51 2017
New Revision: 310029

URL: http://llvm.org/viewvc/llvm-project?rev=310029&view=rev
Log:
Avoid comparison between signed and unsigned in SCEVExitLimitForget tests

Modified:
    llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp

Modified: llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp?rev=310029&r1=310028&r2=310029&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/ScalarEvolutionTest.cpp Thu Aug  3 23:03:51 2017
@@ -995,7 +995,7 @@ TEST_F(ScalarEvolutionsTest, SCEVExitLim
   const SCEV *EC = SE.getBackedgeTakenCount(Loop);
   EXPECT_FALSE(isa<SCEVCouldNotCompute>(EC));
   EXPECT_TRUE(isa<SCEVConstant>(EC));
-  EXPECT_EQ(cast<SCEVConstant>(EC)->getAPInt().getLimitedValue(), 999);
+  EXPECT_EQ(cast<SCEVConstant>(EC)->getAPInt().getLimitedValue(), 999u);
 
   SE.forgetLoop(Loop);
   Br->eraseFromParent();
@@ -1008,7 +1008,7 @@ TEST_F(ScalarEvolutionsTest, SCEVExitLim
   const SCEV *NewEC = SE.getBackedgeTakenCount(Loop);
   EXPECT_FALSE(isa<SCEVCouldNotCompute>(NewEC));
   EXPECT_TRUE(isa<SCEVConstant>(NewEC));
-  EXPECT_EQ(cast<SCEVConstant>(NewEC)->getAPInt().getLimitedValue(), 1999);
+  EXPECT_EQ(cast<SCEVConstant>(NewEC)->getAPInt().getLimitedValue(), 1999u);
 }
 
 // Make sure that SCEV invalidates exit limits after invalidating the values it
@@ -1092,7 +1092,7 @@ TEST_F(ScalarEvolutionsTest, SCEVExitLim
   const SCEV *NewEC = SE.getBackedgeTakenCount(Loop);
   EXPECT_FALSE(isa<SCEVCouldNotCompute>(NewEC));
   EXPECT_TRUE(isa<SCEVConstant>(NewEC));
-  EXPECT_EQ(cast<SCEVConstant>(NewEC)->getAPInt().getLimitedValue(), 1999);
+  EXPECT_EQ(cast<SCEVConstant>(NewEC)->getAPInt().getLimitedValue(), 1999u);
 }
 
 }  // end anonymous namespace




More information about the llvm-commits mailing list