From 58f944cf0ba8bd7425cedb09888516404e907813 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 8 Feb 2022 13:55:01 +0000 Subject: [PATCH] Fix signed/unsigned comparison warnings on ppc buildbots --- llvm/unittests/ADT/APIntTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp index 566ceabf3f56..3eff0771ee6d 100644 --- a/llvm/unittests/ADT/APIntTest.cpp +++ b/llvm/unittests/ADT/APIntTest.cpp @@ -1767,22 +1767,22 @@ TEST(APIntTest, isShiftedMask) { APInt MaskVal = One.shl(I) - 1; EXPECT_TRUE(MaskVal.isShiftedMask()); EXPECT_TRUE(MaskVal.isShiftedMask(MaskIdx, MaskLen)); - EXPECT_EQ(0, MaskIdx); - EXPECT_EQ(I, MaskLen); + EXPECT_EQ(0, (int)MaskIdx); + EXPECT_EQ(I, (int)MaskLen); } for (int I = 1; I < N - 1; ++I) { APInt MaskVal = One.shl(I); EXPECT_TRUE(MaskVal.isShiftedMask()); EXPECT_TRUE(MaskVal.isShiftedMask(MaskIdx, MaskLen)); - EXPECT_EQ(I, MaskIdx); - EXPECT_EQ(1, MaskLen); + EXPECT_EQ(I, (int)MaskIdx); + EXPECT_EQ(1, (int)MaskLen); } for (int I = 1; I < N; ++I) { APInt MaskVal = APInt::getHighBitsSet(N, I); EXPECT_TRUE(MaskVal.isShiftedMask()); EXPECT_TRUE(MaskVal.isShiftedMask(MaskIdx, MaskLen)); - EXPECT_EQ(N - I, MaskIdx); - EXPECT_EQ(I, MaskLen); + EXPECT_EQ(N - I, (int)MaskIdx); + EXPECT_EQ(I, (int)MaskLen); } } }