Home
last modified time | relevance | path

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

12345678910>>...22

/openbsd/gnu/llvm/llvm/include/llvm/ADT/
H A DAPInt.h38 inline APInt operator-(APInt);
2050 inline APInt operator&(APInt a, const APInt &b) {
2055 inline APInt operator&(const APInt &a, APInt &&b) {
2070 inline APInt operator|(APInt a, const APInt &b) {
2090 inline APInt operator^(APInt a, const APInt &b) {
2120 inline APInt operator+(APInt a, const APInt &b) {
2140 inline APInt operator-(APInt a, const APInt &b) {
2200 APInt GreatestCommonDivisor(APInt A, APInt B);
2241 APInt RoundingUDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
2244 APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
[all …]
H A DAPSInt.h23 class [[nodiscard]] APSInt : public APInt {
64 APSInt &operator=(APInt RHS) {
66 APInt::operator=(std::move(RHS));
72 APInt::operator=(RHS);
86 using APInt::toString;
223 ++(static_cast<APInt &>(*this));
227 --(static_cast<APInt &>(*this));
241 static_cast<APInt &>(*this) += RHS;
246 static_cast<APInt &>(*this) -= RHS;
251 static_cast<APInt &>(*this) *= RHS;
[all …]
H A DAPFloat.h143 typedef APInt::WordType integerPart;
319 APInt bitcastToAPInt() const;
478 const APInt *fill = nullptr);
564 APInt convertHalfAPFloatToAPInt() const;
565 APInt convertBFloatAPFloatToAPInt() const;
566 APInt convertFloatAPFloatToAPInt() const;
567 APInt convertDoubleAPFloatToAPInt() const;
574 void initFromHalfAPInt(const APInt &api);
683 APInt bitcastToAPInt() const;
922 APInt intPayload(64, payload);
[all …]
/openbsd/gnu/llvm/llvm/lib/Support/
H A DAPInt.cpp188 APInt& APInt::operator+=(const APInt& RHS) { in operator +=()
208 APInt& APInt::operator-=(const APInt& RHS) { in operator -=()
225 APInt APInt::operator*(const APInt& RHS) const { in operator *()
254 APInt &APInt::operator*=(const APInt &RHS) { in operator *=()
1571 APInt APInt::udiv(const APInt &RHS) const { in udiv()
1642 APInt APInt::sdiv(const APInt &RHS) const { in sdiv()
1664 APInt APInt::urem(const APInt &RHS) const { in urem()
1734 APInt APInt::srem(const APInt &RHS) const { in srem()
2009 APInt APInt::sadd_sat(const APInt &RHS) const { in sadd_sat()
2019 APInt APInt::uadd_sat(const APInt &RHS) const { in uadd_sat()
[all …]
H A DDivisionByConstantInfo.cpp27 APInt Delta; in get()
28 APInt SignedMin = APInt::getSignedMinValue(D.getBitWidth()); in get()
31 APInt AD = D.abs(); in get()
35 APInt Q1, R1, Q2, R2; in get()
39 APInt::udivrem(SignedMin, AD, Q2, R2); in get()
79 APInt Delta; in get()
82 APInt AllOnes = APInt::getAllOnes(D.getBitWidth()).lshr(LeadingZeros); in get()
83 APInt SignedMin = APInt::getSignedMinValue(D.getBitWidth()); in get()
84 APInt SignedMax = APInt::getSignedMaxValue(D.getBitWidth()); in get()
90 APInt Q1, R1, Q2, R2; in get()
[all …]
H A DAPFloat.cpp799 APInt fill_storage; in makeNaN()
1395 dst[i++] = ~(APInt::WordType)0 >> (APInt::APINT_BITS_PER_WORD - bits); in tcSetLeastSignificantBits()
2608 APInt api = Val; in convertFromAPInt()
2653 APInt api = APInt(width, ArrayRef(parts, partCount)); in convertFromZeroExtendedInteger()
3024 APInt Payload; in convertFromStringSpecials()
3288 return APInt(80, words); in convertF80LongDoubleAPFloatToAPInt()
3337 return APInt(128, words); in convertPPCDoubleDoubleAPFloatToAPInt()
3371 return APInt(128, words); in convertQuadrupleAPFloatToAPInt()
4059 APInt significand( in toString()
4127 APInt ten(precision, 10); in toString()
[all …]
H A DKnownBits.cpp35 APInt LHSKnownUnion = LHS.Zero | LHS.One; in computeForAddCarry()
112 APInt MaskedVal(Val); in makeGE()
145 APInt Zero = Val.Zero; in smax()
146 APInt One = Val.One; in smax()
158 APInt Zero = Val.One; in smin()
159 APInt One = Val.Zero; in smin()
428 APInt UMaxLHS = LHS.getMaxValue(); in mul()
429 APInt UMaxRHS = RHS.getMaxValue(); in mul()
479 const APInt &Bottom0 = LHS.One; in mul()
480 const APInt &Bottom1 = RHS.One; in mul()
[all …]
/openbsd/gnu/llvm/llvm/lib/IR/
H A DConstantRange.cpp51 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange()
237 APInt Offset; in getEquivalentICmp()
267 APInt MinValue = APInt::getSignedMinValue(BitWidth); in makeExactMulNSWRegion()
268 APInt MaxValue = APInt::getSignedMaxValue(BitWidth); in makeExactMulNSWRegion()
307 APInt SignedMinVal = APInt::getSignedMinValue(BitWidth); in makeGuaranteedNoWrapRegion()
739 APInt Min = APInt::getMinValue(BW); in castOp()
740 APInt Max = APInt::getMaxValue(BW); in castOp()
750 APInt SMin = APInt::getSignedMinValue(BW); in castOp()
751 APInt SMax = APInt::getSignedMaxValue(BW); in castOp()
1236 APInt Zero = APInt::getZero(getBitWidth()); in sdiv()
[all …]
H A DOperator.cpp92 const DataLayout &DL, APInt &Offset, in accumulateConstantOffset()
104 APInt &Offset, function_ref<bool(Value &, APInt &)> ExternalAnalysis) { in accumulateConstantOffset()
108 APInt IndexedSize = APInt(Offset.getBitWidth(), Size); in accumulateConstantOffset()
116 APInt OffsetPlus = Index.smul_ov(IndexedSize, Overflow); in accumulateConstantOffset()
165 APInt AnalysisIndex; in accumulateConstantOffset()
178 MapVector<Value *, APInt> &VariableOffsets, in collectOffset()
179 APInt &ConstantOffset) const { in collectOffset()
183 auto CollectConstantOffset = [&](APInt Index, uint64_t Size) { in collectOffset()
185 APInt IndexedSize = APInt(BitWidth, Size); in collectOffset()
223 APInt IndexedSize = in collectOffset()
[all …]
/openbsd/gnu/llvm/llvm/lib/Analysis/
H A DDemandedBits.cpp82 const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2, in determineLiveOperandBits()
147 const APInt *SA; in determineLiveOperandBits()
202 const APInt *ShiftAmtC; in determineLiveOperandBits()
219 const APInt *ShiftAmtC; in determineLiveOperandBits()
233 const APInt *ShiftAmtC; in determineLiveOperandBits()
376 APInt AOut; in performAnalysis()
404 APInt AB = APInt::getAllOnes(BitWidth); in performAnalysis()
406 AB = APInt(BitWidth, 0); in performAnalysis()
460 return APInt(BitWidth, 0); in getDemandedBits()
465 APInt AB = APInt::getAllOnes(BitWidth); in getDemandedBits()
[all …]
/openbsd/gnu/llvm/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()
195 getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS, APInt &Offset) const;
240 bool contains(const APInt &Val) const;
246 const APInt *getSingleElement() const { in getSingleElement()
276 APInt getUnsignedMax() const;
279 APInt getUnsignedMin() const;
282 APInt getSignedMax() const;
[all …]
/openbsd/gnu/llvm/llvm/lib/Transforms/InstCombine/
H A DInstCombineSimplifyDemanded.cpp37 const APInt *C; in ShrinkDemandedConstant()
58 APInt DemandedMask(APInt::getAllOnes(BitWidth)); in SimplifyDemandedInstructionBits()
304 const APInt *C; in SimplifyDemandedUseBits()
773 APInt HighBits(APInt::getHighBitsSet( in SimplifyDemandedUseBits()
831 APInt Mask2 = LowBits | APInt::getSignMask(BitWidth); in SimplifyDemandedUseBits()
866 APInt AllOnes = APInt::getAllOnes(BitWidth); in SimplifyDemandedUseBits()
1179 APInt BitMask1(APInt::getAllOnes(BitWidth)); in simplifyShrShlDemandedBits()
1180 APInt BitMask2(APInt::getAllOnes(BitWidth)); in simplifyShrShlDemandedBits()
1246 APInt EltMask(APInt::getAllOnes(VWidth)); in SimplifyDemandedVectorElts()
1317 APInt Demanded, APInt &Undef) { in SimplifyDemandedVectorElts()
[all …]
H A DInstCombineInternal.h48 class APInt; variable
486 const APInt &ShlOp1, const APInt &DemandedMask, KnownBits &Known);
586 const APInt &C);
588 const APInt &C);
590 const APInt &C);
592 const APInt &C);
594 const APInt &C);
596 const APInt &C);
602 const APInt &C);
610 const APInt &C1, const APInt &C2);
[all …]
H A DInstCombineShifts.cpp589 const APInt *C1; in foldShiftedShift()
695 APInt Mask = APInt::getLowBitsSet(TypeWidth, TypeWidth - NumBits); in getShiftedValue()
739 const APInt *DivC; in FoldShiftByConstant()
752 const APInt *Op1C; in FoldShiftByConstant()
809 const APInt *C; in FoldShiftByConstant()
826 const APInt *C; in FoldShiftByConstant()
930 const APInt *C; in visitShl()
946 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl()
1014 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl()
1163 const APInt *C; in visitLShr()
[all …]
/openbsd/gnu/llvm/llvm/lib/Target/AMDGPU/MCTargetDesc/
H A DAMDGPUMCCodeEmitter.h37 APInt &Inst, APInt &Scratch,
41 APInt &Op, SmallVectorImpl<MCFixup> &Fixups,
44 virtual void getSOPPBrEncoding(const MCInst &MI, unsigned OpNo, APInt &Op,
48 virtual void getSMEMOffsetEncoding(const MCInst &MI, unsigned OpNo, APInt &Op,
52 virtual void getSDWASrcEncoding(const MCInst &MI, unsigned OpNo, APInt &Op,
57 APInt &Op,
61 virtual void getAVOperandEncoding(const MCInst &MI, unsigned OpNo, APInt &Op,
/openbsd/gnu/llvm/llvm/lib/Transforms/Utils/
H A DLowerSwitch.cpp55 APInt Low, High;
120 const APInt &NumMergedCases) { in FixPhis()
126 APInt LocalNumMergedCases = NumMergedCases; in FixPhis()
375 APInt UnsignedZero(BitWidth + 1, 0); in ProcessSwitchInst()
376 APInt UnsignedMax = APInt::getMaxValue(BitWidth); in ProcessSwitchInst()
435 DenseMap<BasicBlock *, APInt> Popularity; in ProcessSwitchInst()
436 APInt MaxPop(UnsignedZero); in ProcessSwitchInst()
439 APInt SignedMax = APInt::getSignedMaxValue(BitWidth); in ProcessSwitchInst()
440 APInt SignedMin = APInt::getSignedMinValue(BitWidth); in ProcessSwitchInst()
444 const APInt &Low = I.Low->getValue(); in ProcessSwitchInst()
[all …]
/openbsd/gnu/llvm/llvm/include/llvm/Analysis/
H A DDemandedBits.h54 APInt getDemandedBits(Instruction *I);
57 APInt getDemandedBits(Use *U);
69 static APInt determineLiveOperandBitsAdd(unsigned OperandNo,
70 const APInt &AOut,
76 static APInt determineLiveOperandBitsSub(unsigned OperandNo,
77 const APInt &AOut,
85 const APInt &AOut, APInt &AB,
96 DenseMap<Instruction *, APInt> AliveBits;
/openbsd/gnu/llvm/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()
/openbsd/gnu/llvm/llvm/lib/Target/Hexagon/
H A DHexagonConstPropagation.cpp385 bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result);
390 bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result);
395 bool evaluateXORii(const APInt &A1, const APInt &A2, APInt &Result);
1127 APInt A; in evaluateCMPrr()
1154 APInt A; in evaluateCMPri()
1181 APInt A; in evaluateCMPrp()
1389 APInt A; in evaluateANDrr()
1432 const APInt &A2, APInt &Result) { in evaluateANDii()
1499 const APInt &A2, APInt &Result) { in evaluateORii()
1561 const APInt &A2, APInt &Result) { in evaluateXORii()
[all …]
/openbsd/gnu/llvm/llvm/include/llvm/Support/
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()
H A DKnownBits.h24 APInt Zero;
25 APInt One;
29 KnownBits(APInt Zero, APInt One) in KnownBits()
57 const APInt &getConstant() const { in getConstant()
120 APInt getMinValue() const { in getMinValue()
126 APInt getSignedMinValue() const { in getSignedMinValue()
128 APInt Min = One; in getSignedMinValue()
136 APInt getMaxValue() const { in getMaxValue()
142 APInt getSignedMaxValue() const { in getSignedMaxValue()
144 APInt Max = ~Zero; in getSignedMaxValue()
[all …]
/openbsd/gnu/llvm/llvm/lib/Target/M68k/MCTargetDesc/
H A DM68kMCCodeEmitter.cpp44 APInt &Inst, APInt &Scratch,
48 unsigned InsertPos, APInt &Value,
54 APInt &Value, SmallVectorImpl<MCFixup> &Fixups,
59 APInt &Value, SmallVectorImpl<MCFixup> &Fixups,
114 unsigned InsertPos, APInt &Value, in encodeRelocImm()
141 unsigned InsertPos, APInt &Value, in encodePCRelImm()
176 unsigned InsertPos, APInt &Value, in getMachineOpValue()
211 APInt EncodedInst(16, 0U); in encodeInstruction()
212 APInt Scratch(16, 0U); in encodeInstruction()
/openbsd/gnu/llvm/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()
/openbsd/gnu/llvm/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()
/openbsd/gnu/llvm/llvm/lib/Target/X86/MCTargetDesc/
H A DX86ShuffleDecode.h24 class APInt; variable
100 void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
124 void DecodeVPPERMMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
149 ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
154 ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
158 void DecodeVPERMVMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
162 void DecodeVPERMV3Mask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,

12345678910>>...22