Skip to content

Commit

Permalink
[unittest] Fix -Wsign-compare warnings in KnownBits.cpp after #82354
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Mar 1, 2024
1 parent 7b0b64a commit 214f897
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/unittests/Support/KnownBitsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ TEST(KnownBitsTest, AbsDiffSpecialCase) {
LHS.Zero = APInt(4, 0b0100);
RHS.Zero = APInt(4, 0b0100);
Res = KnownBits::absdiff(LHS, RHS);
EXPECT_EQ(0b0000, Res.One.getZExtValue());
EXPECT_EQ(0b1110, Res.Zero.getZExtValue());
EXPECT_EQ(0b0000ul, Res.One.getZExtValue());
EXPECT_EQ(0b1110ul, Res.Zero.getZExtValue());

// find the common bits between sub(LHS,RHS) and sub(RHS,LHS).
// Actual: false (Inputs = ???1, 1000, Computed = ???1, Exact = 0??1)
Expand All @@ -266,8 +266,8 @@ TEST(KnownBitsTest, AbsDiffSpecialCase) {
LHS.Zero = APInt(4, 0b0000);
RHS.Zero = APInt(4, 0b0111);
Res = KnownBits::absdiff(LHS, RHS);
EXPECT_EQ(0b0001, Res.One.getZExtValue());
EXPECT_EQ(0b0000, Res.Zero.getZExtValue());
EXPECT_EQ(0b0001ul, Res.One.getZExtValue());
EXPECT_EQ(0b0000ul, Res.Zero.getZExtValue());
}

TEST(KnownBitsTest, BinaryExhaustive) {
Expand Down

0 comments on commit 214f897

Please sign in to comment.