/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 i65minus(65, 0, true); in TEST() 69 APInt u128max = APInt::getAllOnesValue(128); in TEST() 77 APInt u64max(128, static_cast<uint64_t>(-1), false); in TEST() 86 APInt zero(128, 0, true); in TEST() 96 APInt one(128, 1, true); in TEST() [all …]
|
/external/llvm/include/llvm/ADT/ |
D | APInt.h | 75 class APInt { 97 APInt(uint64_t* val, unsigned bits) : BitWidth(bits), pVal(val) { } in APInt() function 132 APInt& clearUnusedBits() { in clearUnusedBits() 175 static void divide(const APInt LHS, unsigned lhsWords, 176 const APInt &RHS, unsigned rhsWords, 177 APInt *Quotient, APInt *Remainder); 186 void initSlowCase(const APInt& that); 189 APInt shlSlowCase(unsigned shiftAmt) const; 192 APInt AndSlowCase(const APInt& RHS) const; 195 APInt OrSlowCase(const APInt& RHS) const; [all …]
|
D | APSInt.h | 22 class APSInt : public APInt { 31 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} 33 explicit APSInt(const APInt &I, bool isUnsigned = true) 34 : APInt(I), IsUnsigned(isUnsigned) {} in APInt() function 37 APInt::operator=(RHS); 42 APSInt &operator=(const APInt &RHS) { 44 APInt::operator=(RHS); 50 APInt::operator=(RHS); 62 APInt::toString(Str, Radix, isSigned()); 67 return APInt::toString(Radix, isSigned()); in toString() [all …]
|
D | APFloat.h | 189 explicit APFloat(const APInt &, bool isIEEE = false); 209 APInt fill(64, type); 219 const APInt *payload = 0) { 226 const APInt *payload = 0) { 289 opStatus convertFromAPInt(const APInt &, 296 APInt bitcastToAPInt() const; 401 const APInt *fill); 402 void makeNaN(bool SNaN = false, bool Neg = false, const APInt *fill = 0); 419 APInt convertHalfAPFloatToAPInt() const; 420 APInt convertFloatAPFloatToAPInt() const; [all …]
|
/external/llvm/unittests/Support/ |
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 …]
|
D | IntegersSubsetTest.cpp | 22 class Int : public APInt { 25 Int(uint64_t V) : APInt(64, V) {} in Int() 26 Int(const APInt& Src) : APInt(Src) {} in Int() 27 bool operator < (const APInt& RHS) const { return ult(RHS); } in operator <() 28 bool operator > (const APInt& RHS) const { return ugt(RHS); } in operator >() 29 bool operator <= (const APInt& RHS) const { return ule(RHS); } in operator <=() 30 bool operator >= (const APInt& RHS) const { return uge(RHS); } in operator >=()
|
/external/llvm/lib/Support/ |
D | APInt.cpp | 76 void APInt::initSlowCase(unsigned numBits, uint64_t val, bool isSigned) { in initSlowCase() 84 void APInt::initSlowCase(const APInt& that) { in initSlowCase() 89 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray() 106 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt 111 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt 116 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt 122 APInt& APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase() 154 APInt& APInt::operator=(uint64_t RHS) { in operator =() 165 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile() 196 APInt& APInt::operator++() { in operator ++() [all …]
|
D | ConstantRange.cpp | 34 Lower = Upper = APInt::getMaxValue(BitWidth); in ConstantRange() 36 Lower = Upper = APInt::getMinValue(BitWidth); in ConstantRange() 41 ConstantRange::ConstantRange(const APInt &V) : Lower(V), Upper(V + 1) {} in ConstantRange() 43 ConstantRange::ConstantRange(const APInt &L, const APInt &U) : in ConstantRange() 66 APInt UMax(CR.getUnsignedMax()); in makeICmpRegion() 69 return ConstantRange(APInt::getMinValue(W), UMax); in makeICmpRegion() 72 APInt SMax(CR.getSignedMax()); in makeICmpRegion() 75 return ConstantRange(APInt::getSignedMinValue(W), SMax); in makeICmpRegion() 78 APInt UMax(CR.getUnsignedMax()); in makeICmpRegion() 81 return ConstantRange(APInt::getMinValue(W), UMax + 1); in makeICmpRegion() [all …]
|
D | APFloat.cpp | 361 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation() 369 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation() 383 APInt::tcShiftRight(dst, parts, bits); in shiftRight() 499 APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc); in powerOf5() 509 APInt::tcFullMultiply(p2, p1, pow5, result, pc); in powerOf5() 523 APInt::tcAssign(dst, p1, result); in powerOf5() 627 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand() 634 void APFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) in makeNaN() 644 APInt::tcSet(significand, 0, numParts); in makeNaN() 646 APInt::tcAssign(significand, fill->getRawData(), in makeNaN() [all …]
|
/external/llvm/include/llvm/Support/ |
D | ConstantRange.h | 43 APInt Lower, Upper; 52 ConstantRange(const APInt &Value); 57 ConstantRange(const APInt &Lower, const APInt &Upper); 71 const APInt &getLower() const { return Lower; } in getLower() 75 const APInt &getUpper() const { return Upper; } in getUpper() 102 bool contains(const APInt &Val) const; 111 const APInt *getSingleElement() const { in getSingleElement() 123 APInt getSetSize() const; 128 APInt getUnsignedMax() const; 133 APInt getUnsignedMin() const; [all …]
|
D | IntegersSubset.h | 42 bool operator op (const APInt& RHS) const { \ 48 APInt res = op(getAPIntValue()); \ 54 IntItem operator op (const APInt& RHS) const { \ 55 APInt res = getAPIntValue() op RHS; \ 61 IntItem& operator op (const APInt& RHS) {\ 62 APInt res = getAPIntValue();\ 71 APInt res = getAPIntValue(); \ 80 APInt res = getAPIntValue();\ 90 return (*this) op APInt(getAPIntValue().getBitWidth(), RHS); \ 95 const APInt* APIntVal; [all …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSimplifyDemanded.cpp | 28 APInt Demanded) { in ShrinkDemandedConstant() 54 APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); in SimplifyDemandedInstructionBits() 55 APInt DemandedMask(APInt::getAllOnesValue(BitWidth)); in SimplifyDemandedInstructionBits() 68 bool InstCombiner::SimplifyDemandedBits(Use &U, APInt DemandedMask, in SimplifyDemandedBits() 69 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedBits() 100 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, in SimplifyDemandedUseBits() 101 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedUseBits() 140 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in SimplifyDemandedUseBits() 141 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in SimplifyDemandedUseBits() 214 DemandedMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedUseBits() [all …]
|
D | InstCombineShifts.cpp | 43 Value *A; const APInt *B; in commonShiftTransforms() 93 APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) && in CanEvaluateShifted() 133 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits)) in CanEvaluateShifted() 157 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits)) in CanEvaluateShifted() 234 APInt Mask(APInt::getLowBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue() 274 APInt Mask(APInt::getHighBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue() 380 APInt MaskV(APInt::getLowBitsSet(SrcSize, DstSize)); in FoldShiftByConstant() 426 APInt::getHighBitsSet(TypeBits, TypeBits-Op1Val))); in FoldShiftByConstant() 459 APInt::getHighBitsSet(TypeBits, TypeBits-Op1Val))); in FoldShiftByConstant() 573 APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt1)); in FoldShiftByConstant() [all …]
|
D | InstCombineMulDivRem.cpp | 80 APInt LHSExt = C1->getValue(), RHSExt = C2->getValue(); in MultiplyOverflows() 89 APInt MulExt = LHSExt * RHSExt; in MultiplyOverflows() 92 return MulExt.ugt(APInt::getLowBitsSet(W * 2, W)); in MultiplyOverflows() 94 APInt Min = APInt::getSignedMinValue(W).sext(W * 2); in MultiplyOverflows() 95 APInt Max = APInt::getSignedMaxValue(W).sext(W * 2); in MultiplyOverflows() 121 const APInt &Val = CI->getValue(); in visitMul() 143 const APInt & Val = CI->getValue(); in visitMul() 144 const APInt &PosVal = Val.abs(); in visitMul() 237 APInt Negative2(I.getType()->getPrimitiveSizeInBits(), (uint64_t)-2, true); in visitMul() 445 const APInt *C; in visitUDiv() [all …]
|
D | InstCombine.h | 294 void ComputeMaskedBits(Value *V, APInt &KnownZero, 295 APInt &KnownOne, unsigned Depth = 0) const { 299 bool MaskedValueIsZero(Value *V, const APInt &Mask, 322 Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, 323 APInt& KnownZero, APInt& KnownOne, 325 bool SimplifyDemandedBits(Use &U, APInt DemandedMask, 326 APInt& KnownZero, APInt& KnownOne, 334 Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, 335 APInt& UndefElts, unsigned Depth = 0);
|
D | InstCombineCalls.cpp | 290 APInt KnownZero(BitWidth, 0); in visitCallInst() 291 APInt KnownOne(BitWidth, 0); in visitCallInst() 294 APInt Mask(APInt::getLowBitsSet(BitWidth, TrailingZeros)); in visitCallInst() 297 APInt(BitWidth, TrailingZeros))); in visitCallInst() 308 APInt KnownZero(BitWidth, 0); in visitCallInst() 309 APInt KnownOne(BitWidth, 0); in visitCallInst() 312 APInt Mask(APInt::getHighBitsSet(BitWidth, LeadingZeros)); in visitCallInst() 315 APInt(BitWidth, LeadingZeros))); in visitCallInst() 323 APInt LHSKnownZero(BitWidth, 0); in visitCallInst() 324 APInt LHSKnownOne(BitWidth, 0); in visitCallInst() [all …]
|
D | InstCombineAddSub.cpp | 53 APInt(BitWidth, 1).shl(CSTVal)); in dyn_castFoldableMul() 100 const APInt &Val = CI->getValue(); in visitAdd() 117 const APInt &RHSVal = CI->getValue(); in visitAdd() 129 APInt Mask = APInt::getHighBitsSet(TySizeBits, ExtendAmt); in visitAdd() 144 APInt LHSKnownOne(IT->getBitWidth(), 0); in visitAdd() 145 APInt LHSKnownZero(IT->getBitWidth(), 0); in visitAdd() 205 APInt LHSKnownOne(IT->getBitWidth(), 0); in visitAdd() 206 APInt LHSKnownZero(IT->getBitWidth(), 0); in visitAdd() 209 APInt RHSKnownOne(IT->getBitWidth(), 0); in visitAdd() 210 APInt RHSKnownZero(IT->getBitWidth(), 0); in visitAdd() [all …]
|
D | InstCombineCompares.cpp | 152 static void ComputeSignedMinMaxValuesFromKnownBits(const APInt& KnownZero, in ComputeSignedMinMaxValuesFromKnownBits() 153 const APInt& KnownOne, in ComputeSignedMinMaxValuesFromKnownBits() 154 APInt& Min, APInt& Max) { in ComputeSignedMinMaxValuesFromKnownBits() 159 APInt UnknownBits = ~(KnownZero|KnownOne); in ComputeSignedMinMaxValuesFromKnownBits() 176 static void ComputeUnsignedMinMaxValuesFromKnownBits(const APInt &KnownZero, in ComputeUnsignedMinMaxValuesFromKnownBits() 177 const APInt &KnownOne, in ComputeUnsignedMinMaxValuesFromKnownBits() 178 APInt &Min, APInt &Max) { in ComputeUnsignedMinMaxValuesFromKnownBits() 183 APInt UnknownBits = ~(KnownZero|KnownOne); in ComputeUnsignedMinMaxValuesFromKnownBits() 748 APInt::getSignedMaxValue(BitWidth)); in FoldICmpAddOpCst() 776 const APInt &CmpRHSV = CmpRHS->getValue(); in FoldICmpDivCst() [all …]
|
/external/llvm/lib/Analysis/ |
D | ValueTracking.cpp | 47 APInt &KnownZero, APInt &KnownOne, in ComputeMaskedBitsAddSub() 48 APInt &KnownZero2, APInt &KnownOne2, in ComputeMaskedBitsAddSub() 59 APInt MaskV = APInt::getHighBitsSet(BitWidth, NLZ+1); in ComputeMaskedBitsAddSub() 68 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2); in ComputeMaskedBitsAddSub() 80 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in ComputeMaskedBitsAddSub() 94 APInt Mask = APInt::getLowBitsSet(BitWidth, LHSKnownZeroOut); in ComputeMaskedBitsAddSub() 100 KnownZero |= APInt::getLowBitsSet(BitWidth, in ComputeMaskedBitsAddSub() 105 APInt Mask = APInt::getLowBitsSet(BitWidth, RHSKnownZeroOut); in ComputeMaskedBitsAddSub() 116 KnownZero |= APInt::getSignBit(BitWidth); in ComputeMaskedBitsAddSub() 119 KnownOne |= APInt::getSignBit(BitWidth); in ComputeMaskedBitsAddSub() [all …]
|
/external/llvm/lib/ExecutionEngine/MCJIT/ |
D | MCJIT.cpp | 180 rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue(), in runFunction() 193 rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue(), in runFunction() 203 rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue())); in runFunction() 218 rv.IntVal = APInt(BitWidth, ((bool(*)())(intptr_t)FPtr)()); in runFunction() 220 rv.IntVal = APInt(BitWidth, ((char(*)())(intptr_t)FPtr)()); in runFunction() 222 rv.IntVal = APInt(BitWidth, ((short(*)())(intptr_t)FPtr)()); in runFunction() 224 rv.IntVal = APInt(BitWidth, ((int(*)())(intptr_t)FPtr)()); in runFunction() 226 rv.IntVal = APInt(BitWidth, ((int64_t(*)())(intptr_t)FPtr)()); in runFunction() 232 rv.IntVal = APInt(32, ((int(*)())(intptr_t)FPtr)()); in runFunction()
|
/external/llvm/include/llvm/Analysis/ |
D | ValueTracking.h | 24 class APInt; variable 39 void ComputeMaskedBits(Value *V, APInt &KnownZero, APInt &KnownOne, 41 void computeMaskedBitsLoad(const MDNode &Ranges, APInt &KnownZero); 71 bool MaskedValueIsZero(Value *V, const APInt &Mask,
|
D | MemoryBuiltins.h | 149 typedef std::pair<APInt, APInt> SizeOffsetType; 160 APInt Zero; 163 APInt align(APInt Size, uint64_t Align); 166 return std::make_pair(APInt(), APInt()); in unknown()
|
/external/clang/test/SemaCXX/ |
D | unused.cpp | 5 class APInt { class 8 class APSInt : public APInt { 15 APInt::operator=(RHS); in operator =()
|
/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/llvm/lib/CodeGen/SelectionDAG/ |
D | TargetLowering.cpp | 1105 const APInt &Demanded) { in ShrinkDemandedConstant() 1145 const APInt &Demanded, in ShrinkDemandedOp() 1188 const APInt &DemandedMask, in SimplifyDemandedBits() 1189 APInt &KnownZero, in SimplifyDemandedBits() 1190 APInt &KnownOne, in SimplifyDemandedBits() 1196 APInt NewMask = DemandedMask; in SimplifyDemandedBits() 1200 KnownZero = KnownOne = APInt(BitWidth, 0); in SimplifyDemandedBits() 1212 NewMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedBits() 1222 APInt KnownZero2, KnownOne2, KnownZeroOut, KnownOneOut; in SimplifyDemandedBits() 1235 APInt LHSZero, LHSOne; in SimplifyDemandedBits() [all …]
|