/external/llvm/unittests/ADT/ |
D | APIntTest.cpp | 21 APInt Zero = APInt(); in TEST() 29 APInt One = APInt::getNullValue(65) + 1; in TEST() 30 APInt Shl = One.shl(0); in TEST() 36 APInt Minus3(128, static_cast<uint64_t>(-3), true); in TEST() 40 APInt Minus1(128, static_cast<uint64_t>(-1), true); in TEST() 54 APInt i33minus2(33, static_cast<uint64_t>(-2), true); in TEST() 67 APInt i65(65, 0, true); in TEST() 75 APInt i65minus(65, 0, true); in TEST() 85 APInt u128max = APInt::getAllOnesValue(128); in TEST() 93 APInt u64max(128, static_cast<uint64_t>(-1), false); 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 { 32 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} 34 explicit APSInt(APInt I, bool isUnsigned = true) 35 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function 46 APSInt &operator=(APInt RHS) { 48 APInt::operator=(std::move(RHS)); 54 APInt::operator=(RHS); 66 APInt::toString(Str, Radix, isSigned()); 71 return APInt::toString(Radix, isSigned()); in toString() 73 using APInt::toString; [all …]
|
D | APFloat.h | 198 APFloat(const fltSemantics &, const APInt &); 239 APInt fill(64, type); 248 const APInt *payload = nullptr) { 254 const APInt *payload = nullptr) { 365 opStatus convertFromAPInt(const APInt &, bool, roundingMode); 371 APInt bitcastToAPInt() const; 577 const APInt *fill = nullptr); 579 const APInt *fill); 607 APInt convertHalfAPFloatToAPInt() const; 608 APInt convertFloatAPFloatToAPInt() const; [all …]
|
/external/llvm/unittests/IR/ |
D | ConstantRangeTest.cpp | 30 ConstantRange ConstantRangeTest::One(APInt(16, 0xa)); 31 ConstantRange ConstantRangeTest::Some(APInt(16, 0xa), APInt(16, 0xaaa)); 32 ConstantRange ConstantRangeTest::Wrap(APInt(16, 0xaaa), APInt(16, 0xa)); 39 EXPECT_TRUE(Full.contains(APInt(16, 0x0))); in TEST_F() 40 EXPECT_TRUE(Full.contains(APInt(16, 0x9))); in TEST_F() 41 EXPECT_TRUE(Full.contains(APInt(16, 0xa))); in TEST_F() 42 EXPECT_TRUE(Full.contains(APInt(16, 0xaa9))); in TEST_F() 43 EXPECT_TRUE(Full.contains(APInt(16, 0xaaa))); in TEST_F() 49 EXPECT_FALSE(Empty.contains(APInt(16, 0x0))); in TEST_F() 50 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 | 349 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation() 357 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation() 371 APInt::tcShiftRight(dst, parts, bits); in shiftRight() 487 APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc); in powerOf5() 497 APInt::tcFullMultiply(p2, p1, pow5, result, pc); in powerOf5() 511 APInt::tcAssign(dst, p1, result); in powerOf5() 613 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand() 620 void APFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) in makeNaN() 630 APInt::tcSet(significand, 0, numParts); in makeNaN() 632 APInt::tcAssign(significand, fill->getRawData(), in makeNaN() [all …]
|
/external/llvm/lib/IR/ |
D | ConstantRange.cpp | 36 Lower = Upper = APInt::getMaxValue(BitWidth); in ConstantRange() 38 Lower = Upper = APInt::getMinValue(BitWidth); in ConstantRange() 70 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion() 73 return ConstantRange(APInt::getMinValue(W), UMax); in makeAllowedICmpRegion() 76 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion() 79 return ConstantRange(APInt::getSignedMinValue(W), SMax); in makeAllowedICmpRegion() 82 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion() 85 return ConstantRange(APInt::getMinValue(W), UMax + 1); in makeAllowedICmpRegion() 88 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion() 91 return ConstantRange(APInt::getSignedMinValue(W), SMax + 1); in makeAllowedICmpRegion() [all …]
|
D | Operator.cpp | 16 APInt &Offset) const { in accumulateConstantOffset() 33 Offset += APInt(Offset.getBitWidth(), SL->getElementOffset(ElementIdx)); in accumulateConstantOffset() 38 APInt Index = OpC->getValue().sextOrTrunc(Offset.getBitWidth()); in accumulateConstantOffset() 39 Offset += Index * APInt(Offset.getBitWidth(), in accumulateConstantOffset()
|
/external/llvm/lib/Analysis/ |
D | DemandedBits.cpp | 73 const APInt &AOut, APInt &AB, APInt &KnownZero, APInt &KnownOne, in determineLiveOperandBits() 74 APInt &KnownZero2, APInt &KnownOne2) { in determineLiveOperandBits() 86 KnownZero = APInt(BitWidth, 0); in determineLiveOperandBits() 87 KnownOne = APInt(BitWidth, 0); in determineLiveOperandBits() 92 KnownZero2 = APInt(BitWidth, 0); in determineLiveOperandBits() 93 KnownOne2 = APInt(BitWidth, 0); in determineLiveOperandBits() 117 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits() 127 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits() 139 AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits()); in determineLiveOperandBits() 152 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1); in determineLiveOperandBits() [all …]
|
D | ValueTracking.cpp | 130 static void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, 134 void llvm::computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, in computeKnownBits() 150 APInt LHSKnownZero(IT->getBitWidth(), 0), LHSKnownOne(IT->getBitWidth(), 0); in haveNoCommonBitsSet() 151 APInt RHSKnownZero(IT->getBitWidth(), 0), RHSKnownOne(IT->getBitWidth(), 0); in haveNoCommonBitsSet() 208 static bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, 211 bool llvm::MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, in MaskedValueIsZero() 229 APInt &KnownZero, APInt &KnownOne, in computeKnownBitsAddSub() 230 APInt &KnownZero2, APInt &KnownOne2, in computeKnownBitsAddSub() 242 APInt MaskV = APInt::getHighBitsSet(BitWidth, NLZ+1); in computeKnownBitsAddSub() 251 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2); in computeKnownBitsAddSub() [all …]
|
D | DependenceAnalysis.cpp | 504 APInt Xtop = C1B2_C2B1->getAPInt(); in intersectConstraints() 505 APInt Xbot = A1B2_A2B1->getAPInt(); in intersectConstraints() 506 APInt Ytop = C1A2_C2A1->getAPInt(); in intersectConstraints() 507 APInt Ybot = A2B1_A1B2->getAPInt(); in intersectConstraints() 512 APInt Xq = Xtop; // these need to be initialized, even in intersectConstraints() 513 APInt Xr = Xtop; // though they're just going to be overwritten in intersectConstraints() 514 APInt::sdivrem(Xtop, Xbot, Xq, Xr); in intersectConstraints() 515 APInt Yq = Ytop; in intersectConstraints() 516 APInt Yr = Ytop; in intersectConstraints() 517 APInt::sdivrem(Ytop, Ybot, Yq, Yr); in intersectConstraints() [all …]
|
/external/llvm/include/llvm/IR/ |
D | ConstantRange.h | 44 APInt Lower, Upper; 47 typedef APInt APIntMoveTy; 94 const APInt &C, unsigned NoWrapKind); 98 const APInt &getLower() const { return Lower; } in getLower() 102 const APInt &getUpper() const { return Upper; } in getUpper() 129 bool contains(const APInt &Val) const; 137 const APInt *getSingleElement() const { in getSingleElement() 149 APInt getSetSize() const; 153 APInt getUnsignedMax() const; 157 APInt getUnsignedMin() const; [all …]
|
D | Constant.h | 20 class APInt; variable 109 const APInt &getUniqueInteger() const; 147 static Constant *getIntegerValue(Type *Ty, const APInt &V);
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSimplifyDemanded.cpp | 30 APInt Demanded) { in ShrinkDemandedConstant() 57 APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); in SimplifyDemandedInstructionBits() 58 APInt DemandedMask(APInt::getAllOnesValue(BitWidth)); in SimplifyDemandedInstructionBits() 71 bool InstCombiner::SimplifyDemandedBits(Use &U, APInt DemandedMask, in SimplifyDemandedBits() 72 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedBits() 104 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, in SimplifyDemandedUseBits() 105 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedUseBits() 142 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in SimplifyDemandedUseBits() 143 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in SimplifyDemandedUseBits() 235 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() 835 APInt::getSignedMaxValue(BitWidth)); in FoldICmpAddOpCst() 863 const APInt &CmpRHSV = CmpRHS->getValue(); in FoldICmpDivCst() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | DemandedBits.h | 47 APInt getDemandedBits(Instruction *I); 56 const APInt &AOut, APInt &AB, 57 APInt &KnownZero, APInt &KnownOne, 58 APInt &KnownZero2, APInt &KnownOne2); 67 DenseMap<Instruction *, APInt> AliveBits;
|
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()
|
/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 | 298 const APInt &Demanded) { in ShrinkDemandedConstant() 338 const APInt &Demanded, in ShrinkDemandedOp() 388 const APInt &DemandedMask, in SimplifyDemandedBits() 389 APInt &KnownZero, in SimplifyDemandedBits() 390 APInt &KnownOne, in SimplifyDemandedBits() 396 APInt NewMask = DemandedMask; in SimplifyDemandedBits() 401 KnownZero = KnownOne = APInt(BitWidth, 0); in SimplifyDemandedBits() 413 NewMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedBits() 423 APInt KnownZero2, KnownOne2, KnownZeroOut, KnownOneOut; in SimplifyDemandedBits() 436 APInt LHSZero, LHSOne; in SimplifyDemandedBits() [all …]
|
/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() 238 CreateGEP(curhead, ConstantInt::get(C, APInt(32, curvalue)), in readloop() 273 CreateAdd(tape_0, ConstantInt::get(C, APInt(8, curvalue)), tapereg); in readloop() 437 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 =()
|