[llvm] fc0f074 - [CodeGen] Fix warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon May 5 10:18:51 PDT 2025
Author: Kazu Hirata
Date: 2025-05-05T10:18:46-07:00
New Revision: fc0f074d0d9380a48f15f2c10d39fe8f1694abd1
URL: https://github.com/llvm/llvm-project/commit/fc0f074d0d9380a48f15f2c10d39fe8f1694abd1
DIFF: https://github.com/llvm/llvm-project/commit/fc0f074d0d9380a48f15f2c10d39fe8f1694abd1.diff
LOG: [CodeGen] Fix warnings
This patch fixes:
third-party/unittest/googletest/include/gtest/gtest.h:1379:11:
error: comparison of integers of different signs: 'const unsigned
long' and 'const int' [-Werror,-Wsign-compare]
Added:
Modified:
llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/CodeGen/GlobalISel/CSETest.cpp b/llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
index 7c29c9d419c08..e19e65510bdf7 100644
--- a/llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
+++ b/llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
@@ -503,13 +503,13 @@ TEST_F(AArch64GISelMITest, TestConstantFoldICMP) {
{
auto I = CSEB.buildICmp(CmpInst::Predicate::ICMP_EQ, s32, One, One);
EXPECT_TRUE(I->getOpcode() == TargetOpcode::G_CONSTANT);
- EXPECT_EQ(I->getOperand(1).getCImm()->getZExtValue(), 1);
+ EXPECT_EQ(I->getOperand(1).getCImm()->getZExtValue(), 1U);
}
{
auto I = CSEB.buildICmp(CmpInst::Predicate::ICMP_EQ, s32, One, Two);
EXPECT_TRUE(I->getOpcode() == TargetOpcode::G_CONSTANT);
- EXPECT_EQ(I->getOperand(1).getCImm()->getZExtValue(), 0);
+ EXPECT_EQ(I->getOperand(1).getCImm()->getZExtValue(), 0U);
}
LLT VecTy = LLT::fixed_vector(2, s32);
More information about the llvm-commits
mailing list