Skip to content

Commit 73d835c

Browse files
committed
[ConstraintElimination] Use getAllOnesValue()
Split out from #80309.
1 parent 06f64e8 commit 73d835c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

+1-1
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)