Skip to content

Commit 7dc6d5a

Browse files
nikicakiramenai
authored andcommitted
[ConstraintElimination] Use getAllOnesValue()
Split out from llvm/llvm-project#80309.
1 parent efc1ee6 commit 7dc6d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ void ConstraintInfo::transferToOtherSystem(
875875
addFact(CmpInst::ICMP_ULT, A, B, NumIn, NumOut, DFSInStack);
876876
break;
877877
case CmpInst::ICMP_SGT: {
878-
if (doesHold(CmpInst::ICMP_SGE, B, ConstantInt::get(B->getType(), -1)))
878+
if (doesHold(CmpInst::ICMP_SGE, B, Constant::getAllOnesValue(B->getType())))
879879
addFact(CmpInst::ICMP_UGE, A, ConstantInt::get(B->getType(), 0), NumIn,
880880
NumOut, DFSInStack);
881881
if (IsKnownNonNegative(B))

0 commit comments

Comments
 (0)