Home
last modified time | relevance | path

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

12345678910>>...18

/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/ADT/
H A DAPInt.h36 class APInt; variable
38 inline APInt operator-(APInt);
70 class LLVM_NODISCARD APInt {
100 friend struct DenseMapInfo<APInt>;
108 APInt(uint64_t *val, unsigned bits) : BitWidth(bits) {
148 APInt &clearUnusedBits() {
203 void initSlowCase(const APInt &that);
215 void AssignSlowCase(const APInt &RHS);
218 bool EqualSlowCase(const APInt &RHS) const LLVM_READONLY;
236 bool intersectsSlowCase(const APInt &RHS) const LLVM_READONLY;
[all …]
H A DAPSInt.h22 class LLVM_NODISCARD 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
48 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative()
63 APSInt &operator=(APInt RHS) {
65 APInt::operator=(std::move(RHS));
71 APInt::operator=(RHS);
83 APInt::toString(Str, Radix, isSigned());
88 return APInt::toString(Radix, isSigned()); in toString()
[all …]
H A DAPFloat.h144 typedef APInt::WordType integerPart;
145 static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD;
255 IEEEFloat(const fltSemantics &, const APInt &);
303 opStatus convertFromAPInt(const APInt &, bool, roundingMode);
309 APInt bitcastToAPInt() const;
464 const APInt *fill = nullptr);
548 APInt convertHalfAPFloatToAPInt() const;
549 APInt convertBFloatAPFloatToAPInt() const;
550 APInt convertFloatAPFloatToAPInt() const;
551 APInt convertDoubleAPFloatToAPInt() const;
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Support/
H A DAPInt.cpp77 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase()
86 void APInt::initSlowCase(const APInt& that) { in initSlowCase()
91 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray()
108 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt
113 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt
118 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt
124 void APInt::reallocate(unsigned NewBitWidth) { in reallocate()
143 void APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase()
159 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile()
173 APInt& APInt::operator++() { in operator ++()
[all …]
H A DAPFloat.cpp498 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation()
506 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation()
520 APInt::tcShiftRight(dst, parts, bits); in shiftRight()
634 APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc); in powerOf5()
644 APInt::tcFullMultiply(p2, p1, pow5, result, pc); in powerOf5()
660 APInt::tcAssign(dst, p1, result); in powerOf5()
755 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand()
762 void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) { in makeNaN()
772 APInt::tcSet(significand, 0, numParts); in makeNaN()
774 APInt::tcAssign(significand, fill->getRawData(), in makeNaN()
[all …]
H A DKnownBits.cpp27 APInt PossibleSumZero = LHS.getMaxValue() + RHS.getMaxValue() + !CarryZero; in computeForAddCarry()
28 APInt PossibleSumOne = LHS.getMinValue() + RHS.getMinValue() + CarryOne; in computeForAddCarry()
31 APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.Zero ^ RHS.Zero); in computeForAddCarry()
32 APInt CarryKnownOne = PossibleSumOne ^ LHS.One ^ RHS.One; in computeForAddCarry()
35 APInt LHSKnownUnion = LHS.Zero | LHS.One; in computeForAddCarry()
36 APInt RHSKnownUnion = RHS.Zero | RHS.One; in computeForAddCarry()
37 APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne; in computeForAddCarry()
38 APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion; in computeForAddCarry()
105 KnownBits KnownBits::makeGE(const APInt &Val) const { in makeGE()
112 APInt MaskedVal(Val); in makeGE()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
H A DConstantRange.cpp44 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange()
47 ConstantRange::ConstantRange(APInt V) in ConstantRange()
50 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange()
72 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits()
94 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
97 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion()
100 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
103 return ConstantRange(APInt::getSignedMinValue(W), std::move(SMax)); in makeAllowedICmpRegion()
106 return getNonEmpty(APInt::getMinValue(W), CR.getUnsignedMax() + 1); in makeAllowedICmpRegion()
108 return getNonEmpty(APInt::getSignedMinValue(W), CR.getSignedMax() + 1); in makeAllowedICmpRegion()
[all …]
H A DOperator.cpp62 const DataLayout &DL, APInt &Offset, in accumulateConstantOffset()
63 function_ref<bool(Value &, APInt &)> ExternalAnalysis) const { in accumulateConstantOffset()
74 APInt &Offset, function_ref<bool(Value &, APInt &)> ExternalAnalysis) { in accumulateConstantOffset()
76 auto AccumulateOffset = [&](APInt Index, uint64_t Size) -> bool { in accumulateConstantOffset()
78 APInt IndexedSize = APInt(Offset.getBitWidth(), Size); in accumulateConstantOffset()
86 APInt OffsetPlus = Index.smul_ov(IndexedSize, Overflow); in accumulateConstantOffset()
120 APInt(Offset.getBitWidth(), SL->getElementOffset(ElementIdx)), in accumulateConstantOffset()
135 APInt AnalysisIndex; in accumulateConstantOffset()
148 SmallDenseMap<Value *, APInt, 8> &VariableOffsets, in collectOffset() argument
149 APInt &ConstantOffset) const { in collectOffset()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A DDemandedBits.cpp88 const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2, in determineLiveOperandBits()
137 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits()
147 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits()
153 const APInt *SA; in determineLiveOperandBits()
179 AB = APInt::getBitsSetFrom(BitWidth, AOut.countTrailingZeros()); in determineLiveOperandBits()
204 AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits()); in determineLiveOperandBits()
208 const APInt *ShiftAmtC; in determineLiveOperandBits()
217 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1); in determineLiveOperandBits()
219 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt); in determineLiveOperandBits()
225 const APInt *ShiftAmtC; in determineLiveOperandBits()
[all …]
H A DDependenceAnalysis.cpp520 APInt Xtop = C1B2_C2B1->getAPInt(); in intersectConstraints()
521 APInt Xbot = A1B2_A2B1->getAPInt(); in intersectConstraints()
522 APInt Ytop = C1A2_C2A1->getAPInt(); in intersectConstraints()
523 APInt Ybot = A2B1_A1B2->getAPInt(); in intersectConstraints()
528 APInt Xq = Xtop; // these need to be initialized, even in intersectConstraints()
529 APInt Xr = Xtop; // though they're just going to be overwritten in intersectConstraints()
530 APInt::sdivrem(Xtop, Xbot, Xq, Xr); in intersectConstraints()
531 APInt Yq = Ytop; in intersectConstraints()
532 APInt Yr = Ytop; in intersectConstraints()
533 APInt::sdivrem(Ytop, Ybot, Yq, Yr); in intersectConstraints()
[all …]
H A DLoads.cpp34 static bool isAligned(const Value *Base, const APInt &Offset, Align Alignment, in isAligned()
37 const APInt APAlign(Offset.getBitWidth(), Alignment.value()); in isAligned()
45 const Value *V, Align Alignment, const APInt &Size, const DataLayout &DL, in isDereferenceableAndAlignedPointer()
81 APInt KnownDerefBytes(Size.getBitWidth(), in isDereferenceableAndAlignedPointer()
92 APInt Offset(DL.getTypeStoreSizeInBits(Ty), 0); in isDereferenceableAndAlignedPointer()
125 APInt Offset(DL.getIndexTypeSizeInBits(GEP->getType()), 0); in isDereferenceableAndAlignedPointer()
127 !Offset.urem(APInt(Offset.getBitWidth(), Alignment.value())) in isDereferenceableAndAlignedPointer()
175 APInt KnownDerefBytes(Size.getBitWidth(), ObjSize); in isDereferenceableAndAlignedPointer()
184 APInt Offset(DL.getTypeStoreSizeInBits(Ty), 0); in isDereferenceableAndAlignedPointer()
195 const APInt &Size, in isDereferenceableAndAlignedPointer()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/IR/
H A DConstantRange.h48 APInt Lower, Upper;
65 ConstantRange(APInt Value);
70 ConstantRange(APInt Lower, APInt Upper);
84 static ConstantRange getNonEmpty(APInt Lower, APInt Upper) { in getNonEmpty()
125 const APInt &Other);
154 const APInt &Other,
168 bool getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS) const;
171 const APInt &getLower() const { return Lower; } in getLower()
174 const APInt &getUpper() const { return Upper; } in getUpper()
213 bool contains(const APInt &Val) const;
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/
H A DInstCombineSimplifyDemanded.cpp31 const APInt &Demanded) { in ShrinkDemandedConstant()
37 const APInt *C; in ShrinkDemandedConstant()
58 APInt DemandedMask(APInt::getAllOnesValue(BitWidth)); in SimplifyDemandedInstructionBits()
72 const APInt &DemandedMask, in SimplifyDemandedBits()
108 Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, in SimplifyDemandedUseBits()
276 const APInt *C; in SimplifyDemandedUseBits()
298 APInt NewMask = ~(LHSKnown.One & RHSKnown.One & DemandedMask); in SimplifyDemandedUseBits()
320 const APInt *C; in SimplifyDemandedUseBits()
329 const APInt *C; in SimplifyDemandedUseBits()
353 const APInt &DemandedMask) { in SimplifyDemandedUseBits()
[all …]
H A DInstCombineInternal.h47 class APInt; variable
485 bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth = 0,
575 Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, KnownBits &Known,
578 const APInt &DemandedMask, KnownBits &Known,
585 const APInt &DemandedMask,
592 Instruction *Shr, const APInt &ShrOp1, Instruction *Shl,
593 const APInt &ShlOp1, const APInt &DemandedMask, KnownBits &Known);
600 SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, APInt &UndefElts,
652 Instruction *foldICmpAddOpConst(Value *X, const APInt &C,
672 const APInt &C);
[all …]
H A DInstCombineShifts.cpp43 APInt MaximalRepresentableShiftAmount = in canTryToConstantAddTwoShiftAmounts()
44 APInt::getAllOnesValue(ShAmt0->getType()->getScalarSizeInBits()); in canTryToConstantAddTwoShiftAmounts()
119 APInt(NewShAmtBitWidth, XBitWidth)))) in reassociateShiftAmtsOfTwoSameDirectionShifts()
131 APInt(NewShAmtBitWidth, XBitWidth - 1)))) in reassociateShiftAmtsOfTwoSameDirectionShifts()
350 APInt Threshold(Ty->getScalarSizeInBits(), Ty->getScalarSizeInBits()); in foldShiftOfShiftedLogic()
437 const APInt *InnerShiftConst; in canEvaluateShiftedShift()
465 APInt Mask = APInt::getLowBitsSet(TypeWidth, OuterShAmt) << MaskShift; in canEvaluateShiftedShift()
539 const APInt *C1; in foldShiftedShift()
570 APInt Mask = IsInnerShl in foldShiftedShift()
571 ? APInt::getLowBitsSet(TypeWidth, TypeWidth - OuterShAmt) in foldShiftedShift()
[all …]
H A DInstCombineCompares.cpp40 static bool addWithOverflow(APInt &Result, const APInt &In1, in addWithOverflow()
41 const APInt &In2, bool IsSigned = false) { in addWithOverflow()
53 static bool subWithOverflow(APInt &Result, const APInt &In1, in subWithOverflow()
54 const APInt &In2, bool IsSigned = false) { in subWithOverflow()
77 static bool isSignTest(ICmpInst::Predicate &Pred, const APInt &C) { in isSignTest()
1065 Instruction *InstCombinerImpl::foldICmpAddOpConst(Value *X, const APInt &C, in foldICmpAddOpConst()
1077 APInt::getMaxValue(C.getBitWidth()) - C); in foldICmpAddOpConst()
1088 APInt SMax = APInt::getSignedMaxValue(C.getBitWidth()); in foldICmpAddOpConst()
1116 const APInt &AP1, in foldICmpShrConstConst()
1117 const APInt &AP2) { in foldICmpShrConstConst()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/Hexagon/
H A DHexagonConstPropagation.cpp359 bool constToInt(const Constant *C, APInt &Val) const;
361 const ConstantInt *intToConst(const APInt &Val) const;
366 bool evaluateCMPri(uint32_t Cmp, const RegisterSubReg &R1, const APInt &A2,
370 bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2,
372 bool evaluateCMPpi(uint32_t Cmp, uint32_t Props, const APInt &A2,
383 bool evaluateANDri(const RegisterSubReg &R1, const APInt &A2,
385 bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result);
388 bool evaluateORri(const RegisterSubReg &R1, const APInt &A2,
390 bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result);
393 bool evaluateXORri(const RegisterSubReg &R1, const APInt &A2,
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/
H A DDemandedBits.h54 APInt getDemandedBits(Instruction *I);
66 static APInt determineLiveOperandBitsAdd(unsigned OperandNo,
67 const APInt &AOut,
73 static APInt determineLiveOperandBitsSub(unsigned OperandNo,
74 const APInt &AOut,
82 const APInt &AOut, APInt &AB,
93 DenseMap<Instruction *, APInt> AliveBits;
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Support/
H A DKnownBits.h24 APInt Zero;
25 APInt One;
29 KnownBits(APInt Zero, APInt One) in KnownBits()
57 const APInt &getConstant() const { in getConstant()
118 APInt getMinValue() const { in getMinValue()
124 APInt getSignedMinValue() const { in getSignedMinValue()
126 APInt Min = One; in getSignedMinValue()
134 APInt getMaxValue() const { in getMaxValue()
140 APInt getSignedMaxValue() const { in getSignedMaxValue()
142 APInt Max = ~Zero; in getSignedMaxValue()
[all …]
H A DCheckedArithmetic.h31 llvm::APInt ALHS(sizeof(T) * 8, LHS, Signed);
32 llvm::APInt ARHS(sizeof(T) * 8, RHS, Signed);
34 llvm::APInt Out = (ALHS.*Op)(ARHS, Overflow);
49 return checkedOp(LHS, RHS, &llvm::APInt::sadd_ov); in checkedAdd()
58 return checkedOp(LHS, RHS, &llvm::APInt::ssub_ov); in checkedSub()
67 return checkedOp(LHS, RHS, &llvm::APInt::smul_ov); in checkedMul()
87 return checkedOp(LHS, RHS, &llvm::APInt::uadd_ov, /*Signed=*/false); in checkedAddUnsigned()
96 return checkedOp(LHS, RHS, &llvm::APInt::umul_ov, /*Signed=*/false); in checkedMulUnsigned()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/AggressiveInstCombine/
H A DAggressiveInstCombine.cpp203 APInt Mask;
208 : Root(nullptr), Mask(APInt::getNullValue(BitWidth)), in MaskOps()
240 const APInt *BitIndex = nullptr; in matchAndOrChain()
322 APInt Mask55 = APInt::getSplat(Len, APInt(8, 0x55)); in tryToRecognizePopCount()
323 APInt Mask33 = APInt::getSplat(Len, APInt(8, 0x33)); in tryToRecognizePopCount()
324 APInt Mask0F = APInt::getSplat(Len, APInt(8, 0x0F)); in tryToRecognizePopCount()
325 APInt Mask01 = APInt::getSplat(Len, APInt(8, 0x01)); in tryToRecognizePopCount()
326 APInt MaskShift = APInt(Len, Len - 8); in tryToRecognizePopCount()
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/CodeGen/GlobalISel/
H A DGISelKnownBits.h39 const APInt &DemandedElts,
43 const APInt &DemandedElts, unsigned Depth = 0);
58 const APInt &DemandedElts,
61 unsigned computeNumSignBits(Register R, const APInt &DemandedElts,
67 KnownBits getKnownBits(Register R, const APInt &DemandedElts,
72 APInt getKnownZeroes(Register R);
73 APInt getKnownOnes(Register R);
78 bool maskedValueIsZero(Register Val, const APInt &Mask) { in maskedValueIsZero()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/X86/
H A DX86ShuffleDecodeConstantPool.cpp27 APInt &UndefElts, in extractConstantMask()
55 UndefElts = APInt(NumMaskElts, 0); in extractConstantMask()
79 APInt UndefBits(CstSizeInBits, 0); in extractConstantMask()
80 APInt MaskBits(CstSizeInBits, 0); in extractConstantMask()
99 APInt EltUndef = UndefBits.extractBits(MaskEltSizeInBits, BitOffset); in extractConstantMask()
109 APInt EltBits = MaskBits.extractBits(MaskEltSizeInBits, BitOffset); in extractConstantMask()
123 APInt UndefElts; in DecodePSHUFBMask()
162 APInt UndefElts; in DecodeVPERMILPMask()
198 APInt UndefElts; in DecodeVPERMIL2PMask()
252 APInt UndefElts; in DecodeVPPERMMask()
H A DX86InstCombineIntrinsic.cpp235 APInt DemandedLower = APInt::getOneBitSet(NumAmtElts, 0); in simplifyX86immShift()
236 APInt DemandedUpper = APInt::getBitsSet(NumAmtElts, 1, NumAmtElts / 2); in simplifyX86immShift()
263 APInt Count(64, 0); in simplifyX86immShift()
282 Count = APInt(64, BitWidth - 1); in simplifyX86immShift()
357 APInt UpperBits = in simplifyX86varShift()
358 APInt::getHighBitsSet(BitWidth, BitWidth - Log2_32(BitWidth)); in simplifyX86varShift()
389 APInt ShiftVal = COp->getValue(); in simplifyX86varShift()
466 APInt MinValue, MaxValue; in simplifyX86pack()
472 APInt::getSignedMinValue(DstScalarSizeInBits).sext(SrcScalarSizeInBits); in simplifyX86pack()
474 APInt::getSignedMaxValue(DstScalarSizeInBits).sext(SrcScalarSizeInBits); in simplifyX86pack()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/DebugInfo/CodeView/
H A DRecordSerialization.cpp44 Num = APSInt(APInt(/*numBits=*/16, Short, /*isSigned=*/false), in consume()
54 Num = APSInt(APInt(8, N, true), false); in consume()
61 Num = APSInt(APInt(16, N, true), false); in consume()
68 Num = APSInt(APInt(16, N, false), true); in consume()
75 Num = APSInt(APInt(32, N, true), false); in consume()
82 Num = APSInt(APInt(32, N, FalseVal), true); in consume()
89 Num = APSInt(APInt(64, N, true), false); in consume()
96 Num = APSInt(APInt(64, N, false), true); in consume()

12345678910>>...18