Home
last modified time | relevance | path

Searched refs:isNegative (Results 1 – 25 of 153) sorted by relevance

1234567

/llvm-project-15.0.7/llvm/unittests/ADT/
H A DAPSIntTest.cpp195 EXPECT_FALSE(False.isNegative()); in TEST()
199 EXPECT_TRUE(True.isNegative()); in TEST()
203 EXPECT_FALSE(CharMin.isNegative()); in TEST()
207 EXPECT_FALSE(CharSmall.isNegative()); in TEST()
219 EXPECT_TRUE(CharLarge.isNegative()); in TEST()
223 EXPECT_TRUE(CharMax.isNegative()); in TEST()
238 EXPECT_FALSE(False.isNegative()); in TEST()
242 EXPECT_FALSE(True.isNegative()); in TEST()
246 EXPECT_FALSE(CharMin.isNegative()); in TEST()
250 EXPECT_FALSE(CharSmall.isNegative()); in TEST()
[all …]
H A DAPFloatTest.cpp90 EXPECT_TRUE(!test.isNegative()); in TEST()
97 EXPECT_TRUE(!test.isNegative()); in TEST()
104 EXPECT_TRUE(test.isNegative()); in TEST()
1542 EXPECT_TRUE(P.isNegative()); in TEST()
1556 EXPECT_TRUE(P.isNegative()); in TEST()
1568 EXPECT_TRUE(P.isNegative()); in TEST()
1586 EXPECT_TRUE(P.isNegative()); in TEST()
1592 EXPECT_TRUE(P.isNegative()); in TEST()
1609 EXPECT_TRUE(P.isNegative()); in TEST()
1616 EXPECT_TRUE(P.isNegative()); in TEST()
[all …]
/llvm-project-15.0.7/flang/lib/Evaluate/
H A Dreal.cpp35 bool isNegative{IsNegative()}; in Compare() local
36 if (isNegative != y.IsNegative()) { in Compare()
48 if (isNegative) { in Compare()
67 bool isNegative{IsNegative()}; in Add() local
71 if (isNegative == yIsNegative) { in Add()
118 if (isNegative != yIsNegative) { in Add()
152 result.value = Infinity(isNegative); in Multiply()
212 result.value = Infinity(isNegative); in Divide()
223 if (isNegative) { in Divide()
338 bool isNegative{IsNegative()}; in NEAREST() local
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Math/IR/
H A DMathOps.cpp97 if (a.isNegative()) in fold()
117 if (a.isNegative()) in fold()
137 if (a.isNegative()) in fold()
160 if ((a + APFloat(1.0)).isNegative()) in fold()
164 if ((a + APFloat(1.0f)).isNegative()) in fold()
199 if (a.isNegative()) in fold()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineAtomicRMW.cpp28 return CF->isZero() && CF->isNegative(); in isIdempotentRMW()
30 return CF->isZero() && !CF->isNegative(); in isIdempotentRMW()
67 return !CF->isNegative() && CF->isInfinity(); in isSaturating()
70 return CF->isNegative() && CF->isInfinity(); in isSaturating()
/llvm-project-15.0.7/flang/include/flang/Evaluate/
H A Drounding-bits.h80 Rounding rounding, bool isNegative, bool isOdd) const { in MustRound() argument
89 round = isNegative && !empty(); in MustRound()
92 round = !isNegative && !empty(); in MustRound()
H A Dreal.h227 bool isNegative{n.IsNegative()};
229 if (isNegative) {
243 isNegative, exponent, fraction.SHIFTL(-bitsLost));
246 result.flags |= result.value.Normalize(isNegative, exponent, fraction);
307 bool isNegative{x.IsNegative()};
309 if (isNegative) {
322 result.flags |= result.value.Normalize(isNegative, exponent, fraction);
326 result.flags |= result.value.Normalize(isNegative, exponent, fraction);
420 bool isNegative, int exponent, const Fraction &, Rounding, RoundingBits,
H A Dinteger.h459 bool isNegative{IsNegative()}; in CompareSigned()
460 if (isNegative != y.IsNegative()) { in CompareSigned()
461 return isNegative ? Ordering::Less : Ordering::Greater; in CompareSigned()
772 bool isNegative{IsNegative()}; in AddSigned()
773 bool sameSign{isNegative == y.IsNegative()}; in AddSigned()
775 bool overflow{sameSign && sum.value.IsNegative() != isNegative}; in AddSigned()
780 bool isNegative{IsNegative()}; in SubtractSigned()
781 bool sameSign{isNegative == y.IsNegative()}; in SubtractSigned()
852 bool isNegative{IsNegative()}; in MultiplyUnsigned()
854 if (isNegative) { in MultiplyUnsigned()
[all …]
/llvm-project-15.0.7/llvm/lib/Support/
H A DAPInt.cpp1643 if (isNegative()) { in sdiv()
1648 if (RHS.isNegative()) in sdiv()
1654 if (isNegative()) { in sdiv()
1735 if (isNegative()) { in srem()
1740 if (RHS.isNegative()) in srem()
1746 if (isNegative()) { in srem()
2054 bool ResIsNegative = isNegative() ^ RHS.isNegative(); in smul_sat()
2758 if (Rem.isNegative() != B.isNegative()) in RoundingSDiv()
2762 if (Rem.isNegative() != B.isNegative()) in RoundingSDiv()
2812 if (A.isNegative()) { in SolveQuadraticEquationWrap()
[all …]
H A DAPFixedPoint.cpp44 NewVal = NewVal.isNegative() ? Mask : ~Mask; in convert()
51 if (!DstSema.isSigned() && NewVal.isSigned() && NewVal.isNegative()) { in convert()
309 if (ThisVal.isNegative() != OtherVal.isNegative() && !Rem.isZero()) in div()
374 if (Val.isSigned() && Val.isNegative() && Val != -Val) { in toString()
432 *Overflow = Result.isNegative() || Result.ugt(DstMax); in convertToInt()
H A DAPFloat.cpp256 bool isNegative; in readExponent() local
266 isNegative = (*p == '-'); in readExponent()
291 if (isNegative) in readExponent()
3782 if (isNegative()) in toString()
3790 if (isNegative()) in toString()
3810 if (isNegative()) in toString()
4048 if (!isNegative()) in next()
4085 if (isNegative()) { in next()
4405 LHS.isNegative() != RHS.isNegative()) { in addWithSpecial()
4589 auto Against = Floats[0].isNegative() ^ Floats[1].isNegative(); in compareAbsoluteValue()
[all …]
H A DKnownBits.cpp72 if (!KnownOut.isNegative() && !KnownOut.isNonNegative()) { in computeForAddSub()
80 else if (LHS.isNegative() && RHS.isNegative()) in computeForAddSub()
588 if (LHS.isNegative() && LowBits.intersects(LHS.One)) in srem()
/llvm-project-15.0.7/mlir/lib/AsmParser/
H A DAttributeParser.cpp326 Attribute Parser::parseFloatAttr(Type type, bool isNegative) { in parseFloatAttr() argument
341 return FloatAttr::get(type, isNegative ? -*val : *val); in parseFloatAttr()
372 if (isNegative) in buildAttributeAPInt()
374 } else if (isNegative) { in buildAttributeAPInt()
392 Attribute Parser::parseDecOrHexAttr(Type type, bool isNegative) { in parseDecOrHexAttr() argument
408 if (failed(parseFloatFromIntegerLiteral(result, tok, isNegative, in parseDecOrHexAttr()
419 if (isNegative && type.isUnsignedInteger()) { in parseDecOrHexAttr()
598 bool isNegative = signAndToken.first; in getIntAttrElements() local
602 if (isNegative && isUintType) { in getIntAttrElements()
641 bool isNegative = signAndToken.first; in getFloatAttrElements() local
[all …]
H A DParser.h143 const Token &tok, bool isNegative,
262 Attribute parseFloatAttr(Type type, bool isNegative);
266 Attribute parseDecOrHexAttr(Type type, bool isNegative);
/llvm-project-15.0.7/llvm/include/llvm/ADT/
H A DAPFloat.h340 bool isNegative() const { return sign; } in isNegative() function
379 bool isPosZero() const { return isZero() && !isNegative(); } in isPosZero()
380 bool isNegZero() const { return isZero() && isNegative(); } in isNegZero()
652 bool isNegative() const;
1088 if (isNegative()) in clearSign()
1092 if (isNegative() != RHS.isNegative()) in copySign()
1215 bool isNegative() const { return getIEEE().isNegative(); } in isNegative() function
1323 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative())) in minimum()
1324 return A.isNegative() ? A : B; in minimum()
1336 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative())) in maximum()
[all …]
H A DAPSInt.h49 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative() function
54 bool isNonNegative() const { return !isNegative(); } in isNonNegative()
316 if (I1.isNegative()) in compareValues()
320 if (I2.isNegative()) in compareValues()
H A DAPInt.h312 bool isNegative() const { return (*this)[BitWidth - 1]; } in isNegative() function
317 bool isNonNegative() const { return !isNegative(); } in isNonNegative()
395 return !isNegative() && countTrailingOnesSlowCase() == BitWidth - 1; in isMaxSignedValue()
413 return isNegative() && countTrailingZerosSlowCase() == BitWidth - 1; in isMinSignedValue()
1090 ? isNegative() in slt()
1161 ? !isNegative() in sgt()
1532 return isNegative() ? countLeadingOnes() : countLeadingZeros(); in getNumSignBits()
1687 if (isNegative()) in abs()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DAPSIntType.cpp20 Value.isSigned() && Value.isNegative()) in testInRange()
44 if (Value.isSigned() && Value.isNegative()) in testInRange()
H A DBasicValueFactory.cpp279 if (V2.isSigned() && V2.isNegative()) in evalAPSInt()
288 if (V1.isSigned() && V1.isNegative()) in evalAPSInt()
302 if (V2.isSigned() && V2.isNegative()) in evalAPSInt()
/llvm-project-15.0.7/flang/lib/Decimal/
H A Ddecimal-to-binary.cpp228 bool isNegative, FortranRounding) const;
242 bool isNegative, FortranRounding rounding) const { in ToBinary() argument
275 incr = guard != 0 && !isNegative; in ToBinary()
278 incr = guard != 0 && isNegative; in ToBinary()
304 Raw raw = static_cast<Raw>(isNegative) << (Binary::bits - 1); in ToBinary()
/llvm-project-15.0.7/llvm/lib/FileCheck/
H A DFileCheck.cpp206 if (LeftOperand.isNegative() && RightOperand.isNegative()) { in operator +()
217 if (LeftOperand.isNegative()) in operator +()
221 if (RightOperand.isNegative()) in operator +()
238 if (LeftOperand.isNegative() && !RightOperand.isNegative()) { in operator -()
253 if (LeftOperand.isNegative()) in operator -()
288 if (LeftOperand.isNegative() && RightOperand.isNegative()) in operator *()
320 if (LeftOperand.isNegative() && RightOperand.isNegative()) in operator /()
328 if (LeftOperand.isNegative() || RightOperand.isNegative()) in operator /()
339 if (LeftOperand.isNegative() && RightOperand.isNegative()) { in max()
345 if (!LeftOperand.isNegative() && !RightOperand.isNegative()) { in max()
[all …]
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstantRange.cpp67 if (!IsSigned || Known.isNegative() || Known.isNonNegative()) in fromKnownBits()
274 if (V.isNegative()) { in makeExactMulNSWRegion()
1382 if (MaxLHS.isNegative()) { in srem()
1525 } else if (getSignedMax().isNegative()) { in ashr()
1665 if (SMax.isNegative()) in abs()
1705 if (Max.isNegative() && OtherMax.isNegative() && in signedAddMayOverflow()
1712 if (Min.isNegative() && OtherMin.isNegative() && 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 …]
/llvm-project-15.0.7/clang/lib/AST/Interp/
H A DBoolean.h71 constexpr static bool isNegative() { return false; } in isNegative() function
72 constexpr static bool isPositive() { return !isNegative(); } in isPositive()
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DAMDGPUInstCombineIntrinsic.cpp160 if (ConstantLod->isZero() || ConstantLod->isNegative()) { in simplifyAMDGCNImageIntrinsic()
510 ((Mask & N_INFINITY) && Val.isInfinity() && Val.isNegative()) || in instCombineIntrinsic()
511 ((Mask & N_NORMAL) && Val.isNormal() && Val.isNegative()) || in instCombineIntrinsic()
512 ((Mask & N_SUBNORMAL) && Val.isDenormal() && Val.isNegative()) || in instCombineIntrinsic()
513 ((Mask & N_ZERO) && Val.isZero() && Val.isNegative()) || in instCombineIntrinsic()
514 ((Mask & P_ZERO) && Val.isZero() && !Val.isNegative()) || in instCombineIntrinsic()
515 ((Mask & P_SUBNORMAL) && Val.isDenormal() && !Val.isNegative()) || in instCombineIntrinsic()
516 ((Mask & P_NORMAL) && Val.isNormal() && !Val.isNegative()) || in instCombineIntrinsic()
517 ((Mask & P_INFINITY) && Val.isInfinity() && !Val.isNegative()); in instCombineIntrinsic()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DUndefResultChecker.cpp121 C.isNegative(B->getRHS())) { in checkPostStmt()
150 C.isNegative(B->getLHS())) { in checkPostStmt()

1234567