Home
last modified time | relevance | path

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

12

/llvm-project-15.0.7/llvm/unittests/ADT/
H A DAPSIntTest.cpp196 EXPECT_TRUE(False.isNonNegative()); in TEST()
200 EXPECT_FALSE(True.isNonNegative()); in TEST()
204 EXPECT_TRUE(CharMin.isNonNegative()); in TEST()
208 EXPECT_TRUE(CharSmall.isNonNegative()); in TEST()
224 EXPECT_FALSE(CharMax.isNonNegative()); in TEST()
239 EXPECT_TRUE(False.isNonNegative()); in TEST()
243 EXPECT_TRUE(True.isNonNegative()); in TEST()
247 EXPECT_TRUE(CharMin.isNonNegative()); in TEST()
251 EXPECT_TRUE(CharSmall.isNonNegative()); in TEST()
263 EXPECT_TRUE(CharLarge.isNonNegative()); in TEST()
[all …]
H A DAPIntTest.cpp3005 EXPECT_FALSE(APInt(8, -1).isNonNegative()); in TEST()
3010 EXPECT_TRUE(APInt(8, 0).isNonNegative()); in TEST()
3015 EXPECT_TRUE(APInt(8, 1).isNonNegative()); in TEST()
/llvm-project-15.0.7/mlir/lib/Interfaces/
H A DInferIntRangeInterface.cpp57 if (smin.isNonNegative() == smax.isNonNegative()) { in fromSigned()
71 if (umin.isNonNegative() == umax.isNonNegative()) { in fromUnsigned()
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstantRange.cpp67 if (!IsSigned || Known.isNegative() || Known.isNonNegative()) in fromKnownBits()
422 return !isSignWrappedSet() && Lower.isNonNegative(); in isAllNonNegative()
1371 if (MinLHS.isNonNegative()) { in srem()
1521 if (getSignedMin().isNonNegative()) { in ashr()
1661 if (SMin.isNonNegative()) in abs()
1702 if (Min.isNonNegative() && OtherMin.isNonNegative() && in signedAddMayOverflow()
1709 if (Max.isNonNegative() && OtherMax.isNonNegative() && in signedAddMayOverflow()
1748 if (Min.isNonNegative() && OtherMax.isNegative() && in signedSubMayOverflow()
1751 if (Max.isNegative() && OtherMin.isNonNegative() && in signedSubMayOverflow()
1755 if (Max.isNonNegative() && OtherMin.isNegative() && in signedSubMayOverflow()
[all …]
H A DDataLayout.cpp923 assert(Offset.isNonNegative() && "Remaining offset shouldn't be negative"); in getElementIndex()
/llvm-project-15.0.7/llvm/lib/Support/
H A DKnownBits.cpp72 if (!KnownOut.isNegative() && !KnownOut.isNonNegative()) { in computeForAddSub()
76 if (LHS.isNonNegative() && RHS.isNonNegative()) in computeForAddSub()
397 if (isNonNegative()) in abs()
583 if (LHS.isNonNegative() || LowBits.isSubsetOf(LHS.Zero)) in srem()
H A DAPInt.cpp1928 Overflow = isNonNegative() == RHS.isNonNegative() && in sadd_ov()
1929 Res.isNonNegative() != isNonNegative(); in sadd_ov()
1941 Overflow = isNonNegative() != RHS.isNonNegative() && in ssub_ov()
1942 Res.isNonNegative() != isNonNegative(); in ssub_ov()
1991 if (isNonNegative()) // Don't allow sign change. in sshl_ov()
2855 if (B.isNonNegative()) { in SolveQuadraticEquationWrap()
2903 assert(D.isNonNegative() && "Negative discriminant"); in SolveQuadraticEquationWrap()
2930 assert(X.isNonNegative() && "Solution should be non-negative"); in SolveQuadraticEquationWrap()
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DKnownBits.h99 bool isNonNegative() const { return Zero.isSignBitSet(); } in isNonNegative() function
248 if (isNonNegative()) in countMinSignBits()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/IR/
H A DInferIntRangeInterfaceImpls.cpp249 if (!lhs.srem(rhs).isZero() && lhs.isNonNegative() == rhs.isNonNegative()) { in inferResultRanges()
270 if (!lhs.srem(rhs).isZero() && lhs.isNonNegative() != rhs.isNonNegative()) { in inferResultRanges()
/llvm-project-15.0.7/llvm/include/llvm/ADT/
H A DAPSInt.h54 bool isNonNegative() const { return !isNegative(); } in isNonNegative() function
62 bool isStrictlyPositive() const { return isNonNegative() && !isZero(); } in isStrictlyPositive()
H A DAPInt.h317 bool isNonNegative() const { return !isNegative(); } in isNonNegative() function
339 bool isStrictlyPositive() const { return isNonNegative() && !isZero(); } in isStrictlyPositive()
436 if (isNonNegative()) in isNegatedPowerOf2()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSignedCharMisuseCheck.cpp138 if (Value.isNonNegative()) in check()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/Transforms/
H A DUnsignedWhenEquivalent.cpp30 return success(range.smin().isNonNegative()); in staticallyNonNegative()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DCorrelatedValuePropagation.cpp696 static bool isNonNegative(Value *V, LazyValueInfo *LVI, Instruction *CxtI) { in isNonNegative() function
713 if (isNonNegative(V, LVI, CxtI)) in getDomain()
958 if (!isNonNegative(SDI->getOperand(0), LVI, SDI)) in processAShr()
979 if (!isNonNegative(Base, LVI, SDI)) in processSExt()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DValueTracking.cpp353 return Known.isNonNegative(); in isKnownNonNegative()
492 else if (isKnownNegative && !Known.isNonNegative()) in computeKnownBitsMul()
896 if (RHSKnown.isNonNegative()) { in computeKnownBitsFromAssume()
1527 if (Known2.isNonNegative() && Known3.isNonNegative()) in computeKnownBitsFromOperator()
1544 Known3.isNonNegative()) in computeKnownBitsFromOperator()
2624 if (XKnown.isNonNegative() && YKnown.isNonNegative()) in isKnownNonZero()
2644 if (XKnown.isNonNegative() && in isKnownNonZero()
2647 if (YKnown.isNonNegative() && in isKnownNonZero()
3233 if (Known.isNonNegative()) in ComputeNumSignBitsImpl()
3258 if (Known.isNonNegative()) in ComputeNumSignBitsImpl()
[all …]
H A DInstructionSimplify.cpp2931 if (LHSKnown.isNonNegative()) in simplifyICmpWithZero()
2939 if (LHSKnown.isNonNegative() && in simplifyICmpWithZero()
2948 if (LHSKnown.isNonNegative()) in simplifyICmpWithZero()
2956 if (LHSKnown.isNonNegative() && in simplifyICmpWithZero()
3032 if (RHSKnown.isNonNegative() && YKnown.isNegative()) in simplifyICmpWithBinOpOnLHS()
3034 if (RHSKnown.isNegative() || YKnown.isNonNegative()) in simplifyICmpWithBinOpOnLHS()
3055 if (!Known.isNonNegative()) in simplifyICmpWithBinOpOnLHS()
3066 if (!Known.isNonNegative()) in simplifyICmpWithBinOpOnLHS()
3184 return (C1->slt(*C2) && C1->isNonNegative()) || in trySimplifyICmpWithAdds()
3284 if (C->isNonNegative()) { in simplifyICmpWithBinOp()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DBoundsChecking.cpp99 !SizeRange.getSignedMin().isNonNegative()) { in getBoundsCheckCond()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineSimplifyDemanded.cpp451 if (InputKnown.isNonNegative() || in SimplifyDemandedUseBits()
792 if (LHSKnown.isNonNegative() || LowBits.isSubsetOf(LHSKnown.Zero)) in SimplifyDemandedUseBits()
810 if (LHSKnown.isNonNegative()) in SimplifyDemandedUseBits()
H A DInstCombineCalls.cpp819 if (Known.isNonNegative()) in getKnownSign()
1717 else if (Val->isNonNegative() == Val2->isNonNegative()) { in visitCallInst()
/llvm-project-15.0.7/llvm/lib/Target/AArch64/GISel/
H A DAArch64PostLegalizerCombiner.cpp179 if (ConstValue.isNonNegative()) { in matchAArch64MulConstCombine()
/llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/
H A DGISelKnownBits.cpp732 if (Known.isNonNegative()) { // sign bit is 0 in computeNumSignBits()
/llvm-project-15.0.7/polly/lib/CodeGen/
H A DIslExprBuilder.cpp424 if (Val.isPowerOf2() && Val.isNonNegative()) { in createOpBin()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp1862 NonNegativeUse = RangeInfo->getSignedMin().isNonNegative(); in pushNarrowIVUsers()
1992 !NarrowDefRHS->isNonNegative()) in calculatePostIncRange()
/llvm-project-15.0.7/llvm/unittests/IR/
H A DConstantRangeTest.cpp2189 IsOverflowHigh = N1.isNonNegative(); in TEST_F()
2202 IsOverflowHigh = N1.isNonNegative(); in TEST_F()
2301 if (!N.isNonNegative()) in TEST_F()
/llvm-project-15.0.7/mlir/lib/IR/
H A DOperation.cpp1002 return !element.isNonNegative(); in verifyValueSizeAttr()

12