Home
last modified time | relevance | path

Searched refs:APInt (Results 1 – 25 of 250) sorted by relevance

12345678910

/external/llvm/unittests/ADT/
DAPIntTest.cpp21 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 …]
/external/llvm/include/llvm/ADT/
DAPInt.h75 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 …]
DAPSInt.h22 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 …]
DAPFloat.h195 APFloat(const fltSemantics &, const APInt &);
236 APInt fill(64, type);
245 const APInt *payload = nullptr) {
251 const APInt *payload = nullptr) {
325 opStatus convertFromAPInt(const APInt &, bool, roundingMode);
331 APInt bitcastToAPInt() const;
504 const APInt *fill = nullptr);
506 const APInt *fill);
534 APInt convertHalfAPFloatToAPInt() const;
535 APInt convertFloatAPFloatToAPInt() const;
[all …]
/external/llvm/unittests/IR/
DConstantRangeTest.cpp29 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/
DAPInt.cpp77 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 …]
DAPFloat.cpp347 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation()
355 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation()
369 APInt::tcShiftRight(dst, parts, bits); in shiftRight()
485 APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc); in powerOf5()
495 APInt::tcFullMultiply(p2, p1, pow5, result, pc); in powerOf5()
509 APInt::tcAssign(dst, p1, result); in powerOf5()
611 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand()
618 void APFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) in makeNaN()
628 APInt::tcSet(significand, 0, numParts); in makeNaN()
630 APInt::tcAssign(significand, fill->getRawData(), in makeNaN()
[all …]
/external/llvm/lib/IR/
DConstantRange.cpp34 Lower = Upper = APInt::getMaxValue(BitWidth); in ConstantRange()
36 Lower = Upper = APInt::getMinValue(BitWidth); in ConstantRange()
67 APInt UMax(CR.getUnsignedMax()); in makeICmpRegion()
70 return ConstantRange(APInt::getMinValue(W), UMax); in makeICmpRegion()
73 APInt SMax(CR.getSignedMax()); in makeICmpRegion()
76 return ConstantRange(APInt::getSignedMinValue(W), SMax); in makeICmpRegion()
79 APInt UMax(CR.getUnsignedMax()); in makeICmpRegion()
82 return ConstantRange(APInt::getMinValue(W), UMax + 1); in makeICmpRegion()
85 APInt SMax(CR.getSignedMax()); in makeICmpRegion()
88 return ConstantRange(APInt::getSignedMinValue(W), SMax + 1); in makeICmpRegion()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombineSimplifyDemanded.cpp30 APInt Demanded) { in ShrinkDemandedConstant()
56 APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); in SimplifyDemandedInstructionBits()
57 APInt DemandedMask(APInt::getAllOnesValue(BitWidth)); in SimplifyDemandedInstructionBits()
70 bool InstCombiner::SimplifyDemandedBits(Use &U, APInt DemandedMask, in SimplifyDemandedBits()
71 APInt &KnownZero, APInt &KnownOne, in SimplifyDemandedBits()
102 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, in SimplifyDemandedUseBits()
103 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()
229 DemandedMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedUseBits()
[all …]
DInstCombine.h318 void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
323 bool MaskedValueIsZero(Value *V, const APInt &Mask,
345 Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, APInt &KnownZero,
346 APInt &KnownOne, unsigned Depth);
347 bool SimplifyDemandedBits(Use &U, APInt DemandedMask, APInt &KnownZero,
348 APInt &KnownOne, unsigned Depth = 0);
352 APInt DemandedMask, APInt &KnownZero,
353 APInt &KnownOne);
360 Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
361 APInt &UndefElts, unsigned Depth = 0);
[all …]
DInstCombineShifts.cpp45 Value *A; const APInt *B; in commonShiftTransforms()
95 APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) && in CanEvaluateShifted()
135 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits)) in CanEvaluateShifted()
159 APInt::getLowBitsSet(TypeWidth, NumBits) << LowBits)) in CanEvaluateShifted()
236 APInt Mask(APInt::getLowBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue()
276 APInt Mask(APInt::getHighBitsSet(TypeWidth, TypeWidth - NumBits)); in GetShiftedValue()
383 APInt MaskV(APInt::getLowBitsSet(SrcSize, DstSize)); in FoldShiftByConstant()
429 APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val); in FoldShiftByConstant()
465 APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val); in FoldShiftByConstant()
581 APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt1)); in FoldShiftByConstant()
[all …]
DInstCombineCompares.cpp170 static void ComputeSignedMinMaxValuesFromKnownBits(const APInt& KnownZero, in ComputeSignedMinMaxValuesFromKnownBits()
171 const APInt& KnownOne, in ComputeSignedMinMaxValuesFromKnownBits()
172 APInt& Min, APInt& Max) { in ComputeSignedMinMaxValuesFromKnownBits()
177 APInt UnknownBits = ~(KnownZero|KnownOne); in ComputeSignedMinMaxValuesFromKnownBits()
194 static void ComputeUnsignedMinMaxValuesFromKnownBits(const APInt &KnownZero, in ComputeUnsignedMinMaxValuesFromKnownBits()
195 const APInt &KnownOne, in ComputeUnsignedMinMaxValuesFromKnownBits()
196 APInt &Min, APInt &Max) { in ComputeUnsignedMinMaxValuesFromKnownBits()
201 APInt UnknownBits = ~(KnownZero|KnownOne); in ComputeUnsignedMinMaxValuesFromKnownBits()
779 APInt::getSignedMaxValue(BitWidth)); in FoldICmpAddOpCst()
807 const APInt &CmpRHSV = CmpRHS->getValue(); in FoldICmpDivCst()
[all …]
/external/llvm/include/llvm/IR/
DConstantRange.h43 APInt Lower, Upper;
46 typedef APInt APIntMoveTy;
74 const APInt &getLower() const { return Lower; } in getLower()
78 const APInt &getUpper() const { return Upper; } in getUpper()
105 bool contains(const APInt &Val) const;
114 const APInt *getSingleElement() const { in getSingleElement()
126 APInt getSetSize() const;
131 APInt getUnsignedMax() const;
136 APInt getUnsignedMin() const;
141 APInt getSignedMax() const;
[all …]
DConstant.h20 class APInt; variable
119 const APInt &getUniqueInteger() const;
165 static Constant *getIntegerValue(Type* Ty, const APInt &V);
DMDBuilder.h23 class APInt; variable
63 MDNode *createRange(const APInt &Lo, const APInt &Hi);
/external/llvm/lib/Analysis/
DValueTracking.cpp49 APInt &KnownZero, APInt &KnownOne, in computeKnownBitsAddSub()
50 APInt &KnownZero2, APInt &KnownOne2, in computeKnownBitsAddSub()
61 APInt MaskV = APInt::getHighBitsSet(BitWidth, NLZ+1); in computeKnownBitsAddSub()
70 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2); in computeKnownBitsAddSub()
82 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in computeKnownBitsAddSub()
93 APInt Mask = APInt::getLowBitsSet(BitWidth, LHSKnownZeroOut); in computeKnownBitsAddSub()
99 KnownZero |= APInt::getLowBitsSet(BitWidth, in computeKnownBitsAddSub()
104 APInt Mask = APInt::getLowBitsSet(BitWidth, RHSKnownZeroOut); in computeKnownBitsAddSub()
115 KnownZero |= APInt::getSignBit(BitWidth); in computeKnownBitsAddSub()
118 KnownOne |= APInt::getSignBit(BitWidth); in computeKnownBitsAddSub()
[all …]
DDependenceAnalysis.cpp504 APInt Xtop = C1B2_C2B1->getValue()->getValue(); in intersectConstraints()
505 APInt Xbot = A1B2_A2B1->getValue()->getValue(); in intersectConstraints()
506 APInt Ytop = C1A2_C2A1->getValue()->getValue(); in intersectConstraints()
507 APInt Ybot = A2B1_A1B2->getValue()->getValue(); 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/lib/CodeGen/SelectionDAG/
DTargetLowering.cpp283 const APInt &Demanded) { in ShrinkDemandedConstant()
323 const APInt &Demanded, in ShrinkDemandedOp()
373 const APInt &DemandedMask, in SimplifyDemandedBits()
374 APInt &KnownZero, in SimplifyDemandedBits()
375 APInt &KnownOne, in SimplifyDemandedBits()
381 APInt NewMask = DemandedMask; in SimplifyDemandedBits()
385 KnownZero = KnownOne = APInt(BitWidth, 0); in SimplifyDemandedBits()
397 NewMask = APInt::getAllOnesValue(BitWidth); in SimplifyDemandedBits()
407 APInt KnownZero2, KnownOne2, KnownZeroOut, KnownOneOut; in SimplifyDemandedBits()
420 APInt LHSZero, LHSOne; in SimplifyDemandedBits()
[all …]
/external/llvm/lib/Transforms/Scalar/
DSeparateConstOffsetFromGEP.cpp151 APInt find(Value *V, bool SignExtended, bool ZeroExtended, bool NonNegative);
153 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended,
199 void ComputeKnownBits(Value *V, APInt &KnownOne, APInt &KnownZero) const;
375 APInt ConstantOffsetExtractor::findInEitherOperand(BinaryOperator *BO, in findInEitherOperand()
380 APInt ConstantOffset = find(BO->getOperand(0), SignExtended, ZeroExtended, in findInEitherOperand()
397 APInt ConstantOffsetExtractor::find(Value *V, bool SignExtended, in find()
406 if (U == nullptr) return APInt(BitWidth, 0); in find()
408 APInt ConstantOffset(BitWidth, 0); in find()
562 APInt ConstantOffset = in Extract()
581 void ConstantOffsetExtractor::ComputeKnownBits(Value *V, APInt &KnownOne, in ComputeKnownBits()
[all …]
DReassociate.cpp131 const APInt &getConstPart() const { return ConstPart; } in getConstPart()
153 APInt ConstPart;
185 bool CombineXorOpnd(Instruction *I, XorOpnd *Opnd1, APInt &ConstOpnd,
188 APInt &ConstOpnd, Value *&Res);
223 ConstPart = APInt::getNullValue(V->getType()->getIntegerBitWidth()); in XorOpnd()
349 static void IncorporateWeight(APInt &LHS, const APInt &RHS, unsigned Opcode) { in IncorporateWeight()
399 APInt CM = APInt::getOneBitSet(Bitwidth, CarmichaelShift(Bitwidth)); in IncorporateWeight()
401 APInt Threshold = CM + Bitwidth; in IncorporateWeight()
421 typedef std::pair<Value*, APInt> RepeatedValue;
516 SmallVector<std::pair<BinaryOperator*, APInt>, 8> Worklist; // (Op, Weight) in LinearizeExprTree()
[all …]
/external/llvm/include/llvm/Analysis/
DValueTracking.h24 class APInt; variable
38 void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
43 APInt &KnownZero);
73 bool MaskedValueIsZero(Value *V, const APInt &Mask,
DMemoryBuiltins.h155 typedef std::pair<APInt, APInt> SizeOffsetType;
166 APInt Zero;
169 APInt align(APInt Size, uint64_t Align);
172 return std::make_pair(APInt(), APInt()); in unknown()
DPtrUseVisitor.h120 APInt Offset;
144 APInt Offset;
210 Offset = APInt(IntPtrTy->getBitWidth(), 0); in visitPtr()
253 Offset = APInt(); in visitGetElementPtrInst()
/external/clang/test/SemaCXX/
Dunused.cpp5 class APInt { class
8 class APSInt : public APInt {
15 APInt::operator=(RHS); in operator =()
/external/llvm/examples/BrainF/
DBrainF.cpp81 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()

12345678910