From 73d835cceca0638b7080ecf310594398e50e5206 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 12 Aug 2024 16:32:20 +0200 Subject: [PATCH] [ConstraintElimination] Use getAllOnesValue() Split out from https://github.com/llvm/llvm-project/pull/80309. --- llvm/lib/Transforms/Scalar/ConstraintElimination.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp index c31173879af1e6..84ccf06d16d5e8 100644 --- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp +++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp @@ -875,7 +875,7 @@ void ConstraintInfo::transferToOtherSystem( addFact(CmpInst::ICMP_ULT, A, B, NumIn, NumOut, DFSInStack); break; case CmpInst::ICMP_SGT: { - if (doesHold(CmpInst::ICMP_SGE, B, ConstantInt::get(B->getType(), -1))) + if (doesHold(CmpInst::ICMP_SGE, B, Constant::getAllOnesValue(B->getType()))) addFact(CmpInst::ICMP_UGE, A, ConstantInt::get(B->getType(), 0), NumIn, NumOut, DFSInStack); if (IsKnownNonNegative(B))