[llvm] b481e00 - Fix some signed/unsigned comparison gcc warnings from D87930
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 24 04:52:12 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-24T12:51:51+01:00
New Revision: b481e00bf4de31eeb20b95f83b1eae3dcdb4b79c
URL: https://github.com/llvm/llvm-project/commit/b481e00bf4de31eeb20b95f83b1eae3dcdb4b79c
DIFF: https://github.com/llvm/llvm-project/commit/b481e00bf4de31eeb20b95f83b1eae3dcdb4b79c.diff
LOG: Fix some signed/unsigned comparison gcc warnings from D87930
Added:
Modified:
llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp b/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
index d601b552af84..e9354dafd17b 100644
--- a/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
+++ b/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
@@ -541,21 +541,21 @@ TEST_F(AArch64SelectionDAGTest, getRepeatedSequence_Patterns) {
BitVector Undefs1111, Undefs1133, Undefs0123, Undefs022, Undefs1_3;
EXPECT_TRUE(BV1111->getRepeatedSequence(Seq1111, &Undefs1111));
- EXPECT_EQ(Undefs1111.count(), 3);
- EXPECT_EQ(Seq1111.size(), 1);
+ EXPECT_EQ(Undefs1111.count(), 3u);
+ EXPECT_EQ(Seq1111.size(), 1u);
EXPECT_EQ(Seq1111[0], Val1);
EXPECT_TRUE(BV1133->getRepeatedSequence(Seq1133, &Undefs1133));
- EXPECT_EQ(Undefs1133.count(), 2);
- EXPECT_EQ(Seq1133.size(), 4);
+ EXPECT_EQ(Undefs1133.count(), 2u);
+ EXPECT_EQ(Seq1133.size(), 4u);
EXPECT_EQ(Seq1133[0], Val1);
EXPECT_EQ(Seq1133[1], Val1);
EXPECT_EQ(Seq1133[2], Val3);
EXPECT_EQ(Seq1133[3], Val3);
EXPECT_TRUE(BV0123->getRepeatedSequence(Seq0123, &Undefs0123));
- EXPECT_EQ(Undefs0123.count(), 0);
- EXPECT_EQ(Seq0123.size(), 4);
+ EXPECT_EQ(Undefs0123.count(), 0u);
+ EXPECT_EQ(Seq0123.size(), 4u);
EXPECT_EQ(Seq0123[0], Val0);
EXPECT_EQ(Seq0123[1], Val1);
EXPECT_EQ(Seq0123[2], Val2);
@@ -567,20 +567,20 @@ TEST_F(AArch64SelectionDAGTest, getRepeatedSequence_Patterns) {
// Try again with DemandedElts masks.
APInt Mask1111_0 = APInt::getOneBitSet(NumElts, 0);
EXPECT_TRUE(BV1111->getRepeatedSequence(Mask1111_0, Seq1111, &Undefs1111));
- EXPECT_EQ(Undefs1111.count(), 0);
- EXPECT_EQ(Seq1111.size(), 1);
+ EXPECT_EQ(Undefs1111.count(), 0u);
+ EXPECT_EQ(Seq1111.size(), 1u);
EXPECT_EQ(Seq1111[0], Val1);
APInt Mask1111_1 = APInt::getOneBitSet(NumElts, 2);
EXPECT_TRUE(BV1111->getRepeatedSequence(Mask1111_1, Seq1111, &Undefs1111));
- EXPECT_EQ(Undefs1111.count(), 1);
- EXPECT_EQ(Seq1111.size(), 1);
+ EXPECT_EQ(Undefs1111.count(), 1u);
+ EXPECT_EQ(Seq1111.size(), 1u);
EXPECT_EQ(Seq1111[0], UndefVal);
APInt Mask0123 = APInt(NumElts, 0x7777);
EXPECT_TRUE(BV0123->getRepeatedSequence(Mask0123, Seq0123, &Undefs0123));
- EXPECT_EQ(Undefs0123.count(), 0);
- EXPECT_EQ(Seq0123.size(), 4);
+ EXPECT_EQ(Undefs0123.count(), 0u);
+ EXPECT_EQ(Seq0123.size(), 4u);
EXPECT_EQ(Seq0123[0], Val0);
EXPECT_EQ(Seq0123[1], Val1);
EXPECT_EQ(Seq0123[2], Val2);
@@ -588,8 +588,8 @@ TEST_F(AArch64SelectionDAGTest, getRepeatedSequence_Patterns) {
APInt Mask1_3 = APInt::getHighBitsSet(16, 8);
EXPECT_TRUE(BV1_3->getRepeatedSequence(Mask1_3, Seq1_3, &Undefs1_3));
- EXPECT_EQ(Undefs1_3.count(), 0);
- EXPECT_EQ(Seq1_3.size(), 1);
+ EXPECT_EQ(Undefs1_3.count(), 0u);
+ EXPECT_EQ(Seq1_3.size(), 1u);
EXPECT_EQ(Seq1_3[0], Val3);
}
More information about the llvm-commits
mailing list