Home
last modified time | relevance | path

Searched refs:isNonNegative (Results 1 – 25 of 56) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DKnownBits.cpp125 if (MinVal.isNonNegative()) { in computeForAddSub()
340 if (LHS.isNonNegative()) in shl()
552 if (isNonNegative()) in abs()
624 if (Add && ((LHS.isNegative() && RHS.isNonNegative()) || in computeForSatAddSub()
625 (LHS.isNonNegative() && RHS.isNegative()))) in computeForSatAddSub()
628 (LHS.isNonNegative() && RHS.isNonNegative())))) in computeForSatAddSub()
651 if (LHS.isNonNegative() && RHS.isNonNegative()) in computeForSatAddSub()
653 } else if (Res.isNonNegative()) { in computeForSatAddSub()
663 if (LHS.isNonNegative() || RHS.isNonNegative()) in computeForSatAddSub()
670 if (LHS.isNegative() && RHS.isNonNegative()) in computeForSatAddSub()
[all …]
H A DAPInt.cpp1930 Overflow = isNonNegative() == RHS.isNonNegative() && in sadd_ov()
1931 Res.isNonNegative() != isNonNegative(); in sadd_ov()
1943 Overflow = isNonNegative() != RHS.isNonNegative() && in ssub_ov()
1944 Res.isNonNegative() != isNonNegative(); in ssub_ov()
1997 if (isNonNegative()) // Don't allow sign change. in sshl_ov()
2893 if (B.isNonNegative()) { in SolveQuadraticEquationWrap()
2941 assert(D.isNonNegative() && "Negative discriminant"); in SolveQuadraticEquationWrap()
2968 assert(X.isNonNegative() && "Solution should be non-negative"); in SolveQuadraticEquationWrap()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantRange.cpp69 if (!IsSigned || Known.isNegative() || Known.isNonNegative()) in fromKnownBits()
480 return !isSignWrappedSet() && Lower.isNonNegative(); in isAllNonNegative()
1218 (UR.getUpper().isNonNegative() || UR.getUpper().isMinSignedValue())) in multiply()
1498 if (MinLHS.isNonNegative()) { in srem()
1759 if (LHSMin.isNonNegative()) in computeShlNSW()
1837 if (getSignedMin().isNonNegative()) { in ashr()
1934 APInt NewL = Min.sshl_sat(Min.isNonNegative() ? ShAmtMin : ShAmtMax); in sshl_sat()
1977 if (SMin.isNonNegative()) in abs()
2170 if (Min.isNonNegative() && OtherMin.isNonNegative() && in signedAddMayOverflow()
2177 if (Max.isNonNegative() && OtherMax.isNonNegative() && in signedAddMayOverflow()
[all …]
H A DDataLayout.cpp935 assert(Offset.isNonNegative() && "Remaining offset shouldn't be negative"); in getElementIndex()
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPSInt.h55 bool isNonNegative() const { return !isNegative(); } in isNonNegative() function
63 bool isStrictlyPositive() const { return isNonNegative() && !isZero(); } in isStrictlyPositive()
H A DAPInt.h334 bool isNonNegative() const { return !isNegative(); } in isNonNegative() function
356 bool isStrictlyPositive() const { return isNonNegative() && !isZero(); } in isStrictlyPositive()
451 if (isNonNegative()) in isNegatedPowerOf2()
/freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/
H A DIntegralAP.h158 return getValue().isNonNegative(); in isPositive()
163 return !getValue().isNonNegative(); in isNegative()
H A DFixedPoint.h59 bool isPositive() const { return V.getValue().isNonNegative(); } in isPositive()
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DKnownBits.h101 bool isNonNegative() const { return Zero.isSignBitSet(); } in isNonNegative() function
249 if (isNonNegative()) in countMinSignBits()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp281 return computeKnownBits(V, SQ, Depth).isNonNegative(); in isKnownNonNegative()
292 return Known.isNonNegative() && in isKnownPositive()
366 if (!Add && NSW && !KnownOut.isNonNegative() && in computeKnownBitsAddSub()
387 bool isKnownNonNegativeOp1 = Known.isNonNegative(); in computeKnownBitsMul()
388 bool isKnownNonNegativeOp0 = Known2.isNonNegative(); in computeKnownBitsMul()
424 else if (isKnownNegative && !Known.isNonNegative()) in computeKnownBitsMul()
1662 if (Known2.isNonNegative() && Known3.isNonNegative()) in computeKnownBitsFromOperator()
1674 if (Known2.isNonNegative() && Known3.isNegative()) in computeKnownBitsFromOperator()
1676 else if (Known2.isNegative() && Known3.isNonNegative()) in computeKnownBitsFromOperator()
1683 if (Known2.isNonNegative() && Known3.isNonNegative()) in computeKnownBitsFromOperator()
[all …]
H A DInstructionSimplify.cpp2741 if (Dist.isNonNegative() ? Dist.ult(LHSSize) : (-Dist).ult(RHSSize)) in computePointerICmp()
2950 if (LHSKnown.isNonNegative()) in simplifyICmpWithZero()
2958 if (LHSKnown.isNonNegative() && isKnownNonZero(LHS, Q)) in simplifyICmpWithZero()
2966 if (LHSKnown.isNonNegative()) in simplifyICmpWithZero()
2974 if (LHSKnown.isNonNegative() && isKnownNonZero(LHS, Q)) in simplifyICmpWithZero()
3118 if (RHSKnown.isNonNegative() && YKnown.isNegative()) in simplifyICmpWithBinOpOnLHS()
3120 if (RHSKnown.isNegative() || YKnown.isNonNegative()) in simplifyICmpWithBinOpOnLHS()
3133 if (!Known.isNonNegative()) in simplifyICmpWithBinOpOnLHS()
3144 if (!Known.isNonNegative()) in simplifyICmpWithBinOpOnLHS()
3245 return (C1->slt(*C2) && C1->isNonNegative()) || in trySimplifyICmpWithAdds()
[all …]
H A DIVDescriptors.cpp121 if (!Bits.isNonNegative()) { in computeRecurrenceType()
H A DBasicAliasAnalysis.cpp1384 OffsetHi.isNonNegative() && OffsetHi.uge(V2Size.getValue())) in aliasGEP()
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DBitwiseShiftChecker.cpp253 assert(Left->getValue()->isNonNegative()); in checkLeftShiftOverflow()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DBoundsChecking.cpp103 !SizeRange.getSignedMin().isNonNegative()) { in getBoundsCheckCond()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSCCPSolver.cpp180 auto isNonNegative = [&Solver, &InsertedValues](Value *V) { in replaceSignedInst() local
190 if (!isNonNegative(Op0)) in replaceSignedInst()
202 if (!isNonNegative(Op0)) in replaceSignedInst()
212 if (!isNonNegative(Op0) || !isNonNegative(Op1)) in replaceSignedInst()
H A DSimplifyIndVar.cpp2027 NonNegativeUse = RangeInfo->getSignedMin().isNonNegative(); in pushNarrowIVUsers()
2176 !NarrowDefRHS->isNonNegative()) in calculatePostIncRange()
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/
H A DRISCVGISel.td132 return Known.isNonNegative();
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUCodeGenPrepare.cpp1217 if (Known.isNegative() || !Known.isNonNegative()) in getDivNumBits()
1225 if (Known.isNegative() || !Known.isNonNegative()) in getDivNumBits()
1384 if (Known.isNonNegative()) in getSign32()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/
H A DAArch64PostLegalizerCombiner.cpp191 if (ConstValue.isNonNegative()) { in matchAArch64MulConstCombine()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstructionCombining.cpp1516 return OpsKnown[OpNo].getKnownBits(SQ).isNonNegative(); in foldFBinOpOfIntCastsFromSign()
2687 if (Idx.isNonNegative() != ConstIndices[0].isNonNegative()) in visitGEPOfGEP()
2689 if (!Idx.isNonNegative()) in visitGEPOfGEP()
3297 BasePtrOffset.isNonNegative()) { in visitGetElementPtrInst()
H A DInstCombineLoadStoreAlloca.cpp948 if (Known.isNonNegative()) in canReplaceGEPIdxWithZero()
H A DInstCombineCalls.cpp1103 if (Known.isNonNegative()) in getKnownSign()
2578 else if (Val->isNonNegative() == Val2->isNonNegative()) { in visitCallInst()
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DUnsafeBufferUsage.cpp694 if (ArrIdx.isNonNegative() && ArrIdx.getLimitedValue() < limit) in isSafeArraySubscript()
713 if (result.isNonNegative() && result.getLimitedValue() <= limit) in isSafeArraySubscript()
725 if (result.isNonNegative() && result.getLimitedValue() < limit) in isSafeArraySubscript()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAG.cpp4346 if (ValueLow.isNonNegative() && ValueHigh.isNonNegative()) { in computeKnownBits()
4366 if (ValueLow.isNonNegative()) { in computeKnownBits()
4380 if (Known2.isNonNegative()) in computeKnownBits()
4610 if (N0Known.isNonNegative() || N1Known.isNonNegative()) in computeOverflowForSignedMul()
5056 if (Known.isNonNegative()) in ComputeNumSignBits()
5080 if (Known.isNonNegative()) in ComputeNumSignBits()

123