/external/llvm/unittests/ADT/ |
D | APIntTest.cpp | 21 APInt One = APInt::getNullValue(65) + 1; in TEST() 22 APInt Shl = One.shl(0); in TEST() 28 APInt Minus3(128, static_cast<uint64_t>(-3), true); in TEST() 32 APInt Minus1(128, static_cast<uint64_t>(-1), true); in TEST() 46 APInt i33minus2(33, static_cast<uint64_t>(-2), true); in TEST() 59 APInt i65(65, 0, true); in TEST() 67 APInt i65minus(65, 0, true); in TEST() 77 APInt u128max = APInt::getAllOnesValue(128); in TEST() 85 APInt u64max(128, static_cast<uint64_t>(-1), false); in TEST() 94 APInt zero(128, 0, true); in TEST() [all …]
|
D | APSIntTest.cpp | 28 APInt Wide(256, 0); in TEST() 37 Wide = APInt(128, 1); in TEST() 67 EXPECT_TRUE(APSInt(APInt(3, 7), true).isUnsigned()); in TEST() 68 EXPECT_TRUE(APSInt(APInt(3, 7), false).isSigned()); in TEST() 69 EXPECT_TRUE(APSInt(APInt(4, 7), true).isUnsigned()); in TEST() 70 EXPECT_TRUE(APSInt(APInt(4, 7), false).isSigned()); in TEST() 71 EXPECT_TRUE(APSInt(APInt(4, -7), true).isUnsigned()); in TEST() 72 EXPECT_TRUE(APSInt(APInt(4, -7), false).isSigned()); in TEST() 73 EXPECT_EQ(7, APSInt(APInt(3, 7), true).getExtValue()); in TEST() 74 EXPECT_EQ(-1, APSInt(APInt(3, 7), false).getExtValue()); in TEST() [all …]
|
/external/llvm/include/llvm/ADT/ |
D | APInt.h | 73 class APInt { 98 APInt(uint64_t *val, unsigned bits) : BitWidth(bits), pVal(val) {} in APInt() function 136 APInt &clearUnusedBits() { in clearUnusedBits() 180 static void divide(const APInt LHS, unsigned lhsWords, const APInt &RHS, 181 unsigned rhsWords, APInt *Quotient, APInt *Remainder); 190 void initSlowCase(const APInt &that); 193 APInt shlSlowCase(unsigned shiftAmt) const; 196 APInt AndSlowCase(const APInt &RHS) const; 199 APInt OrSlowCase(const APInt &RHS) const; 202 APInt XorSlowCase(const APInt &RHS) const; [all …]
|
D | APSInt.h | 22 class APSInt : public APInt { 31 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} 33 explicit APSInt(APInt I, bool isUnsigned = true) 34 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function 36 APSInt &operator=(APInt RHS) { 38 APInt::operator=(std::move(RHS)); 44 APInt::operator=(RHS); 56 APInt::toString(Str, Radix, isSigned()); 61 return APInt::toString(Radix, isSigned()); in toString() 63 using APInt::toString; [all …]
|
D | APFloat.h | 195 APFloat(const fltSemantics &, const APInt &); 236 APInt fill(64, type); 245 const APInt *payload = nullptr) { 251 const APInt *payload = nullptr) { 358 opStatus convertFromAPInt(const APInt &, bool, roundingMode); 364 APInt bitcastToAPInt() const; 567 const APInt *fill = nullptr); 569 const APInt *fill); 597 APInt convertHalfAPFloatToAPInt() const; 598 APInt convertFloatAPFloatToAPInt() const; [all …]
|
/external/llvm/unittests/IR/ |
D | ConstantRangeTest.cpp | 29 ConstantRange ConstantRangeTest::One(APInt(16, 0xa)); 30 ConstantRange ConstantRangeTest::Some(APInt(16, 0xa), APInt(16, 0xaaa)); 31 ConstantRange ConstantRangeTest::Wrap(APInt(16, 0xaaa), APInt(16, 0xa)); 38 EXPECT_TRUE(Full.contains(APInt(16, 0x0))); in TEST_F() 39 EXPECT_TRUE(Full.contains(APInt(16, 0x9))); in TEST_F() 40 EXPECT_TRUE(Full.contains(APInt(16, 0xa))); in TEST_F() 41 EXPECT_TRUE(Full.contains(APInt(16, 0xaa9))); in TEST_F() 42 EXPECT_TRUE(Full.contains(APInt(16, 0xaaa))); in TEST_F() 48 EXPECT_FALSE(Empty.contains(APInt(16, 0x0))); in TEST_F() 49 EXPECT_FALSE(Empty.contains(APInt(16, 0x9))); in TEST_F() [all …]
|
/external/llvm/lib/Support/ |
D | APInt.cpp | 77 void APInt::initSlowCase(unsigned numBits, uint64_t val, bool isSigned) { in initSlowCase() 85 void APInt::initSlowCase(const APInt& that) { in initSlowCase() 90 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray() 107 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt 112 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt 117 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt 123 APInt& APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase() 155 APInt& APInt::operator=(uint64_t RHS) { in operator =() 166 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile() 197 APInt& APInt::operator++() { in operator ++() [all …]
|
D | APFloat.cpp | 346 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation() 354 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation() 368 APInt::tcShiftRight(dst, parts, bits); in shiftRight() 484 APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc); in powerOf5() 494 APInt::tcFullMultiply(p2, p1, pow5, result, pc); in powerOf5() 508 APInt::tcAssign(dst, p1, result); in powerOf5() 610 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand() 617 void APFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) in makeNaN() 627 APInt::tcSet(significand, 0, numParts); in makeNaN() 629 APInt::tcAssign(significand, fill->getRawData(), in makeNaN() [all …]
|
/external/llvm/lib/IR/ |
D | ConstantRange.cpp | 34 Lower = Upper = APInt::getMaxValue(BitWidth); in ConstantRange() 36 Lower = Upper = APInt::getMinValue(BitWidth); in ConstantRange() 68 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion() 71 return ConstantRange(APInt::getMinValue(W), UMax); in makeAllowedICmpRegion() 74 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion() 77 return ConstantRange(APInt::getSignedMinValue(W), SMax); in makeAllowedICmpRegion() 80 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion() 83 return ConstantRange(APInt::getMinValue(W), UMax + 1); in makeAllowedICmpRegion() 86 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion() 89 return ConstantRange(APInt::getSignedMinValue(W), SMax + 1); in makeAllowedICmpRegion() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | BDCE.cpp | 62 const APInt &AOut, APInt &AB, 63 APInt &KnownZero, APInt &KnownOne, 64 APInt &KnownZero2, APInt &KnownOne2); 86 const APInt &AOut, APInt &AB, in determineLiveOperandBits() 87 APInt &KnownZero, APInt &KnownOne, in determineLiveOperandBits() 88 APInt &KnownZero2, APInt &KnownOne2) { in determineLiveOperandBits() 100 KnownZero = APInt(BitWidth, 0); in determineLiveOperandBits() 101 KnownOne = APInt(BitWidth, 0); in determineLiveOperandBits() 106 KnownZero2 = APInt(BitWidth, 0); in determineLiveOperandBits() 107 KnownOne2 = APInt(BitWidth, 0); in determineLiveOperandBits() [all …]
|
D | SeparateConstOffsetFromGEP.cpp | 225 APInt find(Value *V, bool SignExtended, bool ZeroExtended, bool NonNegative); 227 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 273 void ComputeKnownBits(Value *V, APInt &KnownOne, APInt &KnownZero) const; 447 APInt ConstantOffsetExtractor::findInEitherOperand(BinaryOperator *BO, in findInEitherOperand() 452 APInt ConstantOffset = find(BO->getOperand(0), SignExtended, ZeroExtended, in findInEitherOperand() 469 APInt ConstantOffsetExtractor::find(Value *V, bool SignExtended, in find() 478 if (U == nullptr) return APInt(BitWidth, 0); in find() 480 APInt ConstantOffset(BitWidth, 0); in find() 637 APInt ConstantOffset = in Extract() 654 void ConstantOffsetExtractor::ComputeKnownBits(Value *V, APInt &KnownOne, in ComputeKnownBits() [all …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSimplifyDemanded.cpp | 29 APInt Demanded) { in ShrinkDemandedConstant() 69 APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); in SimplifyDemandedInstructionBits() 70 APInt DemandedMask(APInt::getAllOnesValue(BitWidth)); in SimplifyDemandedInstructionBits() 83 bool InstCombiner::SimplifyDemandedBits(Use &U, APInt DemandedMask, in SimplifyDemandedBits() 84 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedBits() 116 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, in SimplifyDemandedUseBits() 117 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedUseBits() 154 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in SimplifyDemandedUseBits() 155 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in SimplifyDemandedUseBits() 247 DemandedMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedUseBits() [all …]
|
D | InstCombineShifts.cpp | 45 Value *A; const APInt *B; in commonShiftTransforms() 95 APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) && in CanEvaluateShifted() 135 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits, in CanEvaluateShifted() 160 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits, in CanEvaluateShifted() 241 APInt Mask(APInt::getLowBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue() 281 APInt Mask(APInt::getHighBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue() 390 APInt MaskV(APInt::getLowBitsSet(SrcSize, DstSize)); in FoldShiftByConstant() 436 APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val); in FoldShiftByConstant() 472 APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val); in FoldShiftByConstant() 588 APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt1)); in FoldShiftByConstant() [all …]
|
D | InstCombineInternal.h | 471 void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, in computeKnownBits() 477 bool MaskedValueIsZero(Value *V, const APInt &Mask, unsigned Depth = 0, 515 Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, APInt &KnownZero, 516 APInt &KnownOne, unsigned Depth, 518 bool SimplifyDemandedBits(Use &U, APInt DemandedMask, APInt &KnownZero, 519 APInt &KnownOne, unsigned Depth = 0); 523 APInt DemandedMask, APInt &KnownZero, 524 APInt &KnownOne); 530 Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, 531 APInt &UndefElts, unsigned Depth = 0); [all …]
|
D | InstCombineCompares.cpp | 180 static void ComputeSignedMinMaxValuesFromKnownBits(const APInt& KnownZero, in ComputeSignedMinMaxValuesFromKnownBits() 181 const APInt& KnownOne, in ComputeSignedMinMaxValuesFromKnownBits() 182 APInt& Min, APInt& Max) { in ComputeSignedMinMaxValuesFromKnownBits() 187 APInt UnknownBits = ~(KnownZero|KnownOne); in ComputeSignedMinMaxValuesFromKnownBits() 204 static void ComputeUnsignedMinMaxValuesFromKnownBits(const APInt &KnownZero, in ComputeUnsignedMinMaxValuesFromKnownBits() 205 const APInt &KnownOne, in ComputeUnsignedMinMaxValuesFromKnownBits() 206 APInt &Min, APInt &Max) { in ComputeUnsignedMinMaxValuesFromKnownBits() 211 APInt UnknownBits = ~(KnownZero|KnownOne); in ComputeUnsignedMinMaxValuesFromKnownBits() 765 APInt::getSignedMaxValue(BitWidth)); in FoldICmpAddOpCst() 793 const APInt &CmpRHSV = CmpRHS->getValue(); in FoldICmpDivCst() [all …]
|
D | InstCombineMulDivRem.cpp | 81 static bool MultiplyOverflows(const APInt &C1, const APInt &C2, APInt &Product, in MultiplyOverflows() 93 static bool IsMultiple(const APInt &C1, const APInt &C2, APInt &Quotient, in IsMultiple() 98 APInt Remainder(C1.getBitWidth(), /*Val=*/0ULL, IsSigned); in IsMultiple() 100 APInt::sdivrem(C1, C2, Quotient, Remainder); in IsMultiple() 102 APInt::udivrem(C1, C2, Quotient, Remainder); in IsMultiple() 113 const APInt *IVal; in getLogBase2Vector() 193 const APInt *IVal; in visitMul() 237 const APInt & Val = CI->getValue(); in visitMul() 238 const APInt &PosVal = Val.abs(); in visitMul() 363 APInt Negative2(I.getType()->getPrimitiveSizeInBits(), (uint64_t)-2, true); in visitMul() [all …]
|
/external/llvm/include/llvm/IR/ |
D | ConstantRange.h | 44 APInt Lower, Upper; 47 typedef APInt APIntMoveTy; 87 const APInt &getLower() const { return Lower; } in getLower() 91 const APInt &getUpper() const { return Upper; } in getUpper() 118 bool contains(const APInt &Val) const; 126 const APInt *getSingleElement() const { in getSingleElement() 138 APInt getSetSize() const; 142 APInt getUnsignedMax() const; 146 APInt getUnsignedMin() const; 150 APInt getSignedMax() const; [all …]
|
/external/llvm/lib/Analysis/ |
D | ValueTracking.cpp | 127 static void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, 131 void llvm::computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, in computeKnownBits() 171 static bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, 174 bool llvm::MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, in MaskedValueIsZero() 192 APInt &KnownZero, APInt &KnownOne, in computeKnownBitsAddSub() 193 APInt &KnownZero2, APInt &KnownOne2, in computeKnownBitsAddSub() 205 APInt MaskV = APInt::getHighBitsSet(BitWidth, NLZ+1); in computeKnownBitsAddSub() 214 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2); in computeKnownBitsAddSub() 224 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in computeKnownBitsAddSub() 229 APInt CarryIn(BitWidth, 0); in computeKnownBitsAddSub() [all …]
|
D | DependenceAnalysis.cpp | 503 APInt Xtop = C1B2_C2B1->getValue()->getValue(); in intersectConstraints() 504 APInt Xbot = A1B2_A2B1->getValue()->getValue(); in intersectConstraints() 505 APInt Ytop = C1A2_C2A1->getValue()->getValue(); in intersectConstraints() 506 APInt Ybot = A2B1_A1B2->getValue()->getValue(); in intersectConstraints() 511 APInt Xq = Xtop; // these need to be initialized, even in intersectConstraints() 512 APInt Xr = Xtop; // though they're just going to be overwritten in intersectConstraints() 513 APInt::sdivrem(Xtop, Xbot, Xq, Xr); in intersectConstraints() 514 APInt Yq = Ytop; in intersectConstraints() 515 APInt Yr = Ytop; in intersectConstraints() 516 APInt::sdivrem(Ytop, Ybot, Yq, Yr); in intersectConstraints() [all …]
|
/external/llvm/lib/ExecutionEngine/Orc/ |
D | OrcMCJITReplacement.cpp | 55 rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue(), in runFunction() 68 rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue(), in runFunction() 77 rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue())); in runFunction() 93 rv.IntVal = APInt(BitWidth, ((bool (*)())(intptr_t)FPtr)()); in runFunction() 95 rv.IntVal = APInt(BitWidth, ((char (*)())(intptr_t)FPtr)()); in runFunction() 97 rv.IntVal = APInt(BitWidth, ((short (*)())(intptr_t)FPtr)()); in runFunction() 99 rv.IntVal = APInt(BitWidth, ((int (*)())(intptr_t)FPtr)()); in runFunction() 101 rv.IntVal = APInt(BitWidth, ((int64_t (*)())(intptr_t)FPtr)()); in runFunction() 107 rv.IntVal = APInt(32, ((int (*)())(intptr_t)FPtr)()); in runFunction()
|
/external/llvm/lib/CodeGen/SelectionDAG/ |
D | TargetLowering.cpp | 286 const APInt &Demanded) { in ShrinkDemandedConstant() 326 const APInt &Demanded, in ShrinkDemandedOp() 376 const APInt &DemandedMask, in SimplifyDemandedBits() 377 APInt &KnownZero, in SimplifyDemandedBits() 378 APInt &KnownOne, in SimplifyDemandedBits() 384 APInt NewMask = DemandedMask; in SimplifyDemandedBits() 388 KnownZero = KnownOne = APInt(BitWidth, 0); in SimplifyDemandedBits() 400 NewMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedBits() 410 APInt KnownZero2, KnownOne2, KnownZeroOut, KnownOneOut; in SimplifyDemandedBits() 423 APInt LHSZero, LHSOne; in SimplifyDemandedBits() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | MemoryBuiltins.h | 146 typedef std::pair<APInt, APInt> SizeOffsetType; 157 APInt Zero; 160 APInt align(APInt Size, uint64_t Align); 163 return std::make_pair(APInt(), APInt()); in unknown()
|
D | ValueTracking.h | 24 class APInt; variable 40 void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, 48 APInt &KnownZero); 87 bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL,
|
/external/llvm/examples/BrainF/ |
D | BrainF.cpp | 81 ConstantInt *val_mem = ConstantInt::get(C, APInt(32, memtotal)); in header() 95 ConstantInt::get(C, APInt(8, 0)), in header() 97 ConstantInt::get(C, APInt(32, 1)), in header() 98 ConstantInt::get(C, APInt(1, 0)) in header() 109 CreateGEP(ptr_arr, ConstantInt::get(C, APInt(32, memtotal)), "arrmax"); in header() 114 ConstantInt::get(C, APInt(32, memtotal/2)), in header() 241 CreateGEP(curhead, ConstantInt::get(C, APInt(32, curvalue)), in readloop() 276 CreateAdd(tape_0, ConstantInt::get(C, APInt(8, curvalue)), tapereg); in readloop() 440 ConstantInt::get(C, APInt(8, 0)), testreg); in readloop()
|
/external/clang/test/SemaCXX/ |
D | unused.cpp | 5 class APInt { class 8 class APSInt : public APInt { 15 APInt::operator=(RHS); in operator =()
|