Home
last modified time | relevance | path

Searched refs:BitWidth (Results 1 – 25 of 241) sorted by relevance

12345678910

/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DKnownBits.cpp54 unsigned BitWidth = LHS.getBitWidth(); in computeForAddSub() local
55 KnownBits KnownOut(BitWidth); in computeForAddSub()
83 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub()
86 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
97 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub()
98 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
119 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub()
120 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
125 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub()
126 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
[all …]
H A DAPInt.cpp106 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) : BitWidth(numBits) { in APInt()
111 : BitWidth(numBits) { in APInt()
116 : BitWidth(numbits) { in APInt()
123 BitWidth = NewBitWidth; in reallocate()
132 BitWidth = NewBitWidth; in reallocate()
156 ID.AddInteger(BitWidth); in Profile()
198 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator +=()
218 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator -=()
235 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator *()
237 return APInt(BitWidth, U.VAL * RHS.U.VAL); in operator *()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPInt.h112 : BitWidth(numBits) { in BitWidth() function
156 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt()
164 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt()
166 that.BitWidth = 0; in APInt()
209 static APInt getSignMask(unsigned BitWidth) { in getSignMask() argument
210 return getSignedMinValue(BitWidth); in getSignMask()
302 bool isSingleWord() const { return BitWidth <= APINT_BITS_PER_WORD; } in isSingleWord()
309 bool isNegative() const { return (*this)[BitWidth - 1]; } in isNegative()
321 bool isSignBitSet() const { return (*this)[BitWidth - 1]; } in isSignBitSet()
352 if (BitWidth == 0) in isAllOnes()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DDemandedBits.cpp58 unsigned BitWidth = AB.getBitWidth(); in determineLiveOperandBits() local
67 [&](unsigned BitWidth, const Value *V1, const Value *V2) { in determineLiveOperandBits() argument
73 Known = KnownBits(BitWidth); in determineLiveOperandBits()
77 Known2 = KnownBits(BitWidth); in determineLiveOperandBits()
104 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits()
105 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits()
106 std::min(BitWidth, Known.countMaxLeadingZeros()+1)); in determineLiveOperandBits()
114 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits()
115 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits()
116 std::min(BitWidth, Known.countMaxTrailingZeros()+1)); in determineLiveOperandBits()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A DAPSIntType.h20 uint32_t BitWidth; variable
25 : BitWidth(Width), IsUnsigned(Unsigned) {} in APSIntType()
28 : BitWidth(Value.getBitWidth()), IsUnsigned(Value.isUnsigned()) {} in APSIntType()
30 uint32_t getBitWidth() const { return BitWidth; } in getBitWidth()
40 Value = Value.extOrTrunc(BitWidth); in apply()
56 return llvm::APSInt(BitWidth, IsUnsigned); in getZeroValue()
61 return llvm::APSInt::getMinValue(BitWidth, IsUnsigned); in getMinValue()
66 return llvm::APSInt::getMaxValue(BitWidth, IsUnsigned); in getMaxValue()
70 return (llvm::APSInt(BitWidth, IsUnsigned) = RawValue); in getValue()
92 return BitWidth == Other.BitWidth && IsUnsigned == Other.IsUnsigned;
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DKnownBits.h37 KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {} in KnownBits()
150 KnownBits trunc(unsigned BitWidth) const { in trunc()
151 return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth)); in trunc()
156 KnownBits anyext(unsigned BitWidth) const { in anyext()
157 return KnownBits(Zero.zext(BitWidth), One.zext(BitWidth)); in anyext()
161 KnownBits zext(unsigned BitWidth) const { in zext()
163 APInt NewZero = Zero.zext(BitWidth); in zext()
165 return KnownBits(NewZero, One.zext(BitWidth)); in zext()
169 KnownBits sext(unsigned BitWidth) const { in sext()
170 return KnownBits(Zero.sext(BitWidth), One.sext(BitWidth)); in sext()
[all …]
/freebsd/sys/contrib/dev/acpica/components/executer/
H A Dexregion.c183 UINT32 BitWidth, in AcpiExSystemMemorySpaceHandler() argument
204 switch (BitWidth) in AcpiExSystemMemorySpaceHandler()
229 BitWidth)); in AcpiExSystemMemorySpaceHandler()
342 BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); in AcpiExSystemMemorySpaceHandler()
357 switch (BitWidth) in AcpiExSystemMemorySpaceHandler()
389 switch (BitWidth) in AcpiExSystemMemorySpaceHandler()
451 UINT32 BitWidth, in AcpiExSystemIoSpaceHandler() argument
465 BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); in AcpiExSystemIoSpaceHandler()
474 &Value32, BitWidth); in AcpiExSystemIoSpaceHandler()
481 (UINT32) *Value, BitWidth); in AcpiExSystemIoSpaceHandler()
[all …]
/freebsd/sys/contrib/dev/acpica/components/hardware/
H A Dhwregs.c223 if (!Reg->BitOffset && Reg->BitWidth && in AcpiHwGetAccessBitWidth()
224 ACPI_IS_POWER_OF_TWO (Reg->BitWidth) && in AcpiHwGetAccessBitWidth()
225 ACPI_IS_ALIGNED (Reg->BitWidth, 8)) in AcpiHwGetAccessBitWidth()
227 AccessBitWidth = Reg->BitWidth; in AcpiHwGetAccessBitWidth()
236 Reg->BitOffset + Reg->BitWidth); in AcpiHwGetAccessBitWidth()
292 UINT8 BitWidth; in AcpiHwValidateRegister() local
336 BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth); in AcpiHwValidateRegister()
337 if (MaxBitWidth < BitWidth) in AcpiHwValidateRegister()
341 MaxBitWidth, BitWidth)); in AcpiHwValidateRegister()
373 UINT32 BitWidth; in AcpiHwRead() local
[all …]
H A Dhwvalid.c163 UINT32 BitWidth);
240 UINT32 BitWidth) in AcpiHwValidateIoRequest() argument
253 if ((BitWidth != 8) && in AcpiHwValidateIoRequest()
254 (BitWidth != 16) && in AcpiHwValidateIoRequest()
255 (BitWidth != 32)) in AcpiHwValidateIoRequest()
258 "Bad BitWidth parameter: %8.8X", BitWidth)); in AcpiHwValidateIoRequest()
263 ByteWidth = ACPI_DIV_8 (BitWidth); in AcpiHwValidateIoRequest()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DExpandLargeFpConvert.cpp96 unsigned BitWidth = FPToI->getType()->getIntegerBitWidth(); in expandFPToI() local
124 Builder.getIntN(BitWidth, 1), Builder.getIntN(BitWidth, FPMantissaWidth)); in expandFPToI()
126 Builder.CreateSub(ImplicitBit, Builder.getIntN(BitWidth, 1)); in expandFPToI()
131 ConstantInt::getSigned(IntTy, BitWidth - 1)); in expandFPToI()
167 Builder.CreateLShr(ARep, Builder.getIntN(BitWidth, FPMantissaWidth)); in expandFPToI()
169 And, Builder.getIntN(BitWidth, (1 << ExponentWidth) - 1)); in expandFPToI()
173 Builder.CreateICmpULT(And2, Builder.getIntN(BitWidth, ExponentBias)); in expandFPToI()
180 IntTy, -static_cast<int64_t>(ExponentBias + BitWidth))); in expandFPToI()
182 Add1, ConstantInt::getSigned(IntTy, -static_cast<int64_t>(BitWidth))); in expandFPToI()
194 And2, Builder.getIntN(BitWidth, ExponentBias + FPMantissaWidth)); in expandFPToI()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DIntegralAP.h59 IntegralAP(T Value, unsigned BitWidth) in IntegralAP() argument
60 : V(APInt(BitWidth, static_cast<uint64_t>(Value), Signed)) {} in IntegralAP()
114 static IntegralAP from(Integral<Bits, InputSigned> I, unsigned BitWidth) { in from() argument
115 APInt Copy = APInt(BitWidth, static_cast<uint64_t>(I), InputSigned); in from()
120 static IntegralAP zero(int32_t BitWidth) { in zero() argument
121 APInt V = APInt(BitWidth, 0LL, Signed); in zero()
156 IntegralAP truncate(unsigned BitWidth) const { in truncate() argument
158 return IntegralAP(V.trunc(BitWidth).sextOrTrunc(this->bitWidth())); in truncate()
160 return IntegralAP(V.trunc(BitWidth).zextOrTrunc(this->bitWidth())); in truncate()
277 uint32_t BitWidth = V.getBitWidth(); in serialize() local
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DSIRegisterInfo.cpp2612 getAnyVGPRClassForBitWidth(unsigned BitWidth) { in getAnyVGPRClassForBitWidth() argument
2613 if (BitWidth == 64) in getAnyVGPRClassForBitWidth()
2615 if (BitWidth == 96) in getAnyVGPRClassForBitWidth()
2617 if (BitWidth == 128) in getAnyVGPRClassForBitWidth()
2619 if (BitWidth == 160) in getAnyVGPRClassForBitWidth()
2621 if (BitWidth == 192) in getAnyVGPRClassForBitWidth()
2623 if (BitWidth == 224) in getAnyVGPRClassForBitWidth()
2625 if (BitWidth == 256) in getAnyVGPRClassForBitWidth()
2627 if (BitWidth == 288) in getAnyVGPRClassForBitWidth()
2629 if (BitWidth == 320) in getAnyVGPRClassForBitWidth()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DGISelKnownBits.cpp90 unsigned BitWidth = Ty.getScalarSizeInBits(); in signBitIsZero() local
91 return maskedValueIsZero(R, APInt::getSignMask(BitWidth)); in signBitIsZero()
133 static KnownBits extractBits(unsigned BitWidth, const KnownBits &SrcOpKnown, in extractBits() argument
136 KnownBits Mask(BitWidth); in extractBits()
138 BitWidth, WidthKnown.getMaxValue().getLimitedValue(BitWidth)); in extractBits()
140 BitWidth, WidthKnown.getMinValue().getLimitedValue(BitWidth)); in extractBits()
160 unsigned BitWidth = DstTy.getScalarSizeInBits(); in computeKnownBitsImpl() local
166 assert(Known.getBitWidth() == BitWidth && "Cache entry size doesn't match"); in computeKnownBitsImpl()
169 Known = KnownBits(BitWidth); // Don't know anything in computeKnownBitsImpl()
214 Known.One = APInt::getAllOnes(BitWidth); in computeKnownBitsImpl()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DPatternInit.cpp37 unsigned BitWidth = in initializationPatternFor() local
39 if (BitWidth <= 64) in initializationPatternFor()
42 Ty, llvm::APInt::getSplat(BitWidth, llvm::APInt(64, IntValue))); in initializationPatternFor()
55 unsigned BitWidth = llvm::APFloat::semanticsSizeInBits( in initializationPatternFor() local
58 if (BitWidth >= 64) in initializationPatternFor()
59 Payload = llvm::APInt::getSplat(BitWidth, Payload); in initializationPatternFor()
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DConstantRange.h62 explicit ConstantRange(uint32_t BitWidth, bool isFullSet);
73 static ConstantRange getEmpty(uint32_t BitWidth) { in getEmpty() argument
74 return ConstantRange(BitWidth, false); in getEmpty()
78 static ConstantRange getFull(uint32_t BitWidth) { in getFull() argument
79 return ConstantRange(BitWidth, true); in getFull()
359 uint32_t BitWidth) const;
365 ConstantRange zeroExtend(uint32_t BitWidth) const;
371 ConstantRange signExtend(uint32_t BitWidth) const;
377 ConstantRange truncate(uint32_t BitWidth) const;
381 ConstantRange zextOrTrunc(uint32_t BitWidth) const;
[all …]
/freebsd/sys/contrib/dev/acpica/components/tables/
H A Dtbfadt.c326 UINT8 BitWidth; in AcpiTbInitGenericAddress() local
333 BitWidth = (UINT8) (ByteWidth * 8); in AcpiTbInitGenericAddress()
349 BitWidth = 255; in AcpiTbInitGenericAddress()
361 GenericAddress->BitWidth = BitWidth; in AcpiTbInitGenericAddress()
741 (Address64->BitWidth != ACPI_MUL_8 (Length))) in AcpiTbConvertFadt()
745 Name, ACPI_MUL_8 (Length), Address64->BitWidth)); in AcpiTbConvertFadt()
843 (FadtInfoTable[i].DefaultLength != Target64->BitWidth)) in AcpiTbSetupFadtRegisters()
847 FadtInfoTable[i].Name, Target64->BitWidth, in AcpiTbSetupFadtRegisters()
852 Target64->BitWidth = FadtInfoTable[i].DefaultLength; in AcpiTbSetupFadtRegisters()
863 ACPI_DIV_16 (AcpiGbl_FADT.XPm1aEventBlock.BitWidth); in AcpiTbSetupFadtRegisters()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp455 unsigned BitWidth = Ty->getScalarSizeInBits(); in commonShiftTransforms() local
464 AddC->isNegative() && (-*AddC).ult(BitWidth)) { in commonShiftTransforms()
511 if (match(Op1, m_Or(m_Value(), m_SpecificInt(BitWidth - 1)))) in commonShiftTransforms()
512 return replaceOperand(I, 1, ConstantInt::get(Ty, BitWidth - 1)); in commonShiftTransforms()
985 unsigned BitWidth = KnownCnt.getBitWidth(); in setShiftFlags() local
988 uint64_t MaxCnt = KnownCnt.getMaxValue().getLimitedValue(BitWidth - 1); in setShiftFlags()
1037 unsigned BitWidth = Ty->getScalarSizeInBits(); in visitShl() local
1055 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl()
1061 C1->ult(BitWidth)) { in visitShl()
1086 C1->ult(BitWidth)) { in visitShl()
[all …]
H A DInstCombineSimplifyDemanded.cpp60 if (unsigned BitWidth = Ty->getScalarSizeInBits()) in getBitWidth() local
61 return BitWidth; in getBitWidth()
164 uint32_t BitWidth = DemandedMask.getBitWidth(); in SimplifyDemandedUseBits() local
167 (!VTy->isIntOrIntVectorTy() || VTy->getScalarSizeInBits() == BitWidth) && in SimplifyDemandedUseBits()
168 Known.getBitWidth() == BitWidth && in SimplifyDemandedUseBits()
171 KnownBits LHSKnown(BitWidth), RHSKnown(BitWidth); in SimplifyDemandedUseBits()
193 DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits()
454 Known = InputKnown.zextOrTrunc(BitWidth); in SimplifyDemandedUseBits()
485 Known = InputKnown.sext(BitWidth); in SimplifyDemandedUseBits()
529 APInt DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits()
[all …]
/freebsd/contrib/llvm-project/llvm/utils/TableGen/
H A DCodeEmitterGen.cpp75 unsigned BitWidth = 0u; member in __anon7119260a0111::CodeEmitterGen
317 int NumWords = APInt::getNumWords(BitWidth); in getInstructionCases()
318 Case += " Inst = APInt(" + itostr(BitWidth); in getInstructionCases()
411 emitInstBits(o, APInt(BitWidth, 0)); in emitInstructionBaseValues()
425 APInt Value(BitWidth, 0); in emitInstructionBaseValues()
436 APInt Value(BitWidth, 0); in emitInstructionBaseValues()
486 BitWidth = 0; in run()
498 BitWidth = std::max(BitWidth, BI->getNumBits()); in run()
505 BitWidth = std::max(BitWidth, BI->getNumBits()); in run()
507 UseAPInt = BitWidth > 64; in run()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/
H A DIFSHandler.cpp108 IO.mapOptional("BitWidth", Target.BitWidth); in mapping()
224 !CopyStub->Target.BitWidth))
253 if (Stub.Target.BitWidth && *Stub.Target.BitWidth != *OverrideBitWidth) { in overrideIFSTarget()
255 "Supplied BitWidth conflicts with the text stub", OverrideEC); in overrideIFSTarget()
257 Stub.Target.BitWidth = *OverrideBitWidth; in overrideIFSTarget()
272 if (Stub.Target.Arch || Stub.Target.BitWidth || Stub.Target.Endianness || in validateIFSTarget()
281 Stub.Target.BitWidth = TargetFromTriple.BitWidth; in validateIFSTarget()
[all...]
/freebsd/contrib/llvm-project/clang/lib/Basic/Targets/
H A DAVR.h159 IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getIntTypeByWidth() argument
161 return BitWidth == 16 ? (IsSigned ? SignedInt : UnsignedInt) in getIntTypeByWidth()
162 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned); in getIntTypeByWidth()
165 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getLeastIntTypeByWidth() argument
167 return BitWidth == 16 in getLeastIntTypeByWidth()
169 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned); in getLeastIntTypeByWidth()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantRange.cpp44 ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) in ConstantRange() argument
45 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange()
278 unsigned BitWidth = V.getBitWidth(); in makeExactMulNUWRegion() local
283 APIntOps::RoundingUDiv(APInt::getMinValue(BitWidth), V, in makeExactMulNUWRegion()
285 APIntOps::RoundingUDiv(APInt::getMaxValue(BitWidth), V, in makeExactMulNUWRegion()
292 unsigned BitWidth = V.getBitWidth(); in makeExactMulNSWRegion() local
294 return ConstantRange::getFull(BitWidth); in makeExactMulNSWRegion()
296 APInt MinValue = APInt::getSignedMinValue(BitWidth); in makeExactMulNSWRegion()
297 APInt MaxValue = APInt::getSignedMaxValue(BitWidth); in makeExactMulNSWRegion()
326 unsigned BitWidth = Other.getBitWidth(); in makeGuaranteedNoWrapRegion() local
[all …]
H A DDataLayout.cpp126 uint32_t BitWidth) { in get() argument
131 retval.TypeBitWidth = BitWidth; in get()
580 uint32_t BitWidth) { in findAlignmentLowerBound() argument
581 return partition_point(Alignments, [BitWidth](const LayoutAlignElem &E) { in findAlignmentLowerBound()
582 return E.TypeBitWidth < BitWidth; in findAlignmentLowerBound()
587 Align PrefAlign, uint32_t BitWidth) { in setAlignment() argument
593 if (!isUInt<24>(BitWidth)) in setAlignment()
616 auto I = partition_point(*Alignments, [BitWidth](const LayoutAlignElem &E) { in setAlignment()
617 return E.TypeBitWidth < BitWidth; in setAlignment()
619 if (I != Alignments->end() && I->TypeBitWidth == BitWidth) { in setAlignment()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Basic/
H A DTargetInfo.cpp287 unsigned BitWidth, bool IsSigned) const { in getIntTypeByWidth() argument
288 if (getCharWidth() == BitWidth) in getIntTypeByWidth()
290 if (getShortWidth() == BitWidth) in getIntTypeByWidth()
292 if (getIntWidth() == BitWidth) in getIntTypeByWidth()
294 if (getLongWidth() == BitWidth) in getIntTypeByWidth()
296 if (getLongLongWidth() == BitWidth) in getIntTypeByWidth()
301 TargetInfo::IntType TargetInfo::getLeastIntTypeByWidth(unsigned BitWidth, in getLeastIntTypeByWidth() argument
303 if (getCharWidth() >= BitWidth) in getLeastIntTypeByWidth()
305 if (getShortWidth() >= BitWidth) in getLeastIntTypeByWidth()
307 if (getIntWidth() >= BitWidth) in getLeastIntTypeByWidth()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/InterfaceStub/
H A DIFSStub.h70 std::optional<IFSBitWidthType> BitWidth; member
76 if (Lhs.Arch != Rhs.Arch || Lhs.BitWidth != Rhs.BitWidth ||
119 uint8_t convertIFSBitWidthToELF(IFSBitWidthType BitWidth);
138 IFSBitWidthType convertELFBitWidthToIFS(uint8_t BitWidth);

12345678910