Skip to content

Commit 214f897

Browse files
committed
[unittest] Fix -Wsign-compare warnings in KnownBits.cpp after llvm#82354
1 parent 7b0b64a commit 214f897

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/unittests/Support/KnownBitsTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ TEST(KnownBitsTest, AbsDiffSpecialCase) {
256256
LHS.Zero = APInt(4, 0b0100);
257257
RHS.Zero = APInt(4, 0b0100);
258258
Res = KnownBits::absdiff(LHS, RHS);
259-
EXPECT_EQ(0b0000, Res.One.getZExtValue());
260-
EXPECT_EQ(0b1110, Res.Zero.getZExtValue());
259+
EXPECT_EQ(0b0000ul, Res.One.getZExtValue());
260+
EXPECT_EQ(0b1110ul, Res.Zero.getZExtValue());
261261

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

273273
TEST(KnownBitsTest, BinaryExhaustive) {

0 commit comments

Comments
 (0)