[llvm] [ConstraintElim] Use isKnownNonNegative for signed->unsigned transfer. (PR #72879)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 14:48:14 PST 2023
================
@@ -804,7 +804,8 @@ void ConstraintInfo::transferToOtherSystem(
}
break;
case CmpInst::ICMP_SLT:
- if (doesHold(CmpInst::ICMP_SGE, A, ConstantInt::get(B->getType(), 0)))
+ if (doesHold(CmpInst::ICMP_SGE, A, ConstantInt::get(B->getType(), 0)) ||
+ isKnownNonNegative(A, DL, /*Depth=*/MaxAnalysisRecursionDepth - 1))
----------------
fhahn wrote:
Just had to add test cases for all the others. Should be done in 97a6c1534f6 and updated the patch
https://github.com/llvm/llvm-project/pull/72879
More information about the llvm-commits
mailing list