Skip to content

Commit

Permalink
[ConstraintElimination] Use getAllOnesValue()
Browse files Browse the repository at this point in the history
Split out from #80309.
  • Loading branch information
nikic committed Aug 12, 2024
1 parent 06f64e8 commit 73d835c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 73d835c

Please sign in to comment.