| /llvm-project-15.0.7/llvm/include/llvm/Support/ |
| H A D | KnownBits.h | 37 KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {} in KnownBits() 153 return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth)); in trunc() 159 return KnownBits(Zero.zext(BitWidth), One.zext(BitWidth)); in anyext() 172 return KnownBits(Zero.sext(BitWidth), One.sext(BitWidth)); in sext() 178 if (BitWidth > getBitWidth()) in anyextOrTrunc() 179 return anyext(BitWidth); in anyextOrTrunc() 181 return trunc(BitWidth); in anyextOrTrunc() 189 return zext(BitWidth); in zextOrTrunc() 191 return trunc(BitWidth); in zextOrTrunc() 199 return sext(BitWidth); in sextOrTrunc() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 153 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt() 161 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt() 163 that.BitWidth = 0; in APInt() 604 BitWidth = RHS.BitWidth; 627 BitWidth = that.BitWidth; 656 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); 686 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); 715 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); 1343 return setBits(BitWidth - hiBits, BitWidth); in setHighBits() 1369 APInt Keep = getHighBitsSet(BitWidth, BitWidth - loBits); in clearLowBits() [all …]
|
| /llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | APSIntType.h | 20 uint32_t BitWidth; variable 25 : BitWidth(Width), IsUnsigned(Unsigned) {} 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; 100 return std::tie(BitWidth, IsUnsigned) < [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | KnownBits.cpp | 93 if (SrcBitWidth == BitWidth) in sextInReg() 169 KnownBits Known(BitWidth); in shl() 223 KnownBits Known(BitWidth); in lshr() 276 KnownBits Known(BitWidth); in ashr() 498 KnownBits Res(BitWidth); in mul() 519 return mul(WideLHS, WideRHS).extractBits(BitWidth, BitWidth); in mulhs() 528 return mul(WideLHS, WideRHS).extractBits(BitWidth, BitWidth); in mulhu() 534 KnownBits Known(BitWidth); in udiv() 543 LeadZ = std::min(BitWidth, LeadZ + BitWidth - RHSMaxLeadingZeros - 1); in udiv() 552 KnownBits Known(BitWidth); in urem() [all …]
|
| H A D | APInt.cpp | 189 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator +=() 209 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator -=() 226 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator *() 583 Arg.BitWidth, in hash_value() 708 assert(BitWidth >= 16 && BitWidth % 8 == 0 && "Cannot byteswap!"); in byteSwap() 722 if (Result.BitWidth != BitWidth) { in byteSwap() 723 Result.lshrInPlace(Result.BitWidth - BitWidth); in byteSwap() 724 Result.BitWidth = BitWidth; in byteSwap() 1254 APInt t[2] = { APInt(BitWidth, 0), APInt(BitWidth, 1) }; in multiplicativeInverse() 1759 unsigned BitWidth = LHS.BitWidth; in udivrem() local [all …]
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | DemandedBits.cpp | 84 unsigned BitWidth = AB.getBitWidth(); in determineLiveOperandBits() local 99 Known = KnownBits(BitWidth); in determineLiveOperandBits() 103 Known2 = KnownBits(BitWidth); in determineLiveOperandBits() 151 if (isPowerOf2_32(BitWidth)) in determineLiveOperandBits() 152 AB = BitWidth - 1; in determineLiveOperandBits() 282 AB = AOut.zext(BitWidth); in determineLiveOperandBits() 285 AB = AOut.trunc(BitWidth); in determineLiveOperandBits() 288 AB = AOut.trunc(BitWidth); in determineLiveOperandBits() 406 AB = APInt(BitWidth, 0); in performAnalysis() 457 return APInt::getAllOnes(BitWidth); in getDemandedBits() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 865 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 901 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 912 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 933 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 985 APInt Bits = APInt::getHighBitsSet(BitWidth, BitWidth - Op1Val); in visitShl() 1076 if (II && isPowerOf2_32(BitWidth) && Log2_32(BitWidth) == ShAmtC && in visitLShr() 1104 APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmtC)); in visitLShr() 1119 APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmtC)); in visitLShr() 1125 APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmtC)); in visitLShr() 1140 APInt Bits = APInt::getLowBitsSet(BitWidth, BitWidth - Op1Val); in visitLShr() [all …]
|
| H A D | InstCombineSimplifyDemanded.cpp | 57 KnownBits Known(BitWidth); in SimplifyDemandedInstructionBits() 148 KnownBits LHSKnown(BitWidth), RHSKnown(BitWidth); in SimplifyDemandedUseBits() 163 DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits() 619 APInt DemandedFromOp(APInt::getLowBitsSet(BitWidth, BitWidth - CTLZ)); in SimplifyDemandedUseBits() 725 BitWidth, std::min(SignBits + ShiftAmt - 1, BitWidth))); in SimplifyDemandedUseBits() 757 APInt::getHighBitsSet(BitWidth, BitWidth - RHSTrailingZeros); in SimplifyDemandedUseBits() 816 KnownBits Known2(BitWidth); in SimplifyDemandedUseBits() 956 KnownBits LHSKnown(BitWidth); in SimplifyMultipleUseDemandedBits() 957 KnownBits RHSKnown(BitWidth); in SimplifyMultipleUseDemandedBits() 1058 BitWidth, BitWidth - ShiftRC->getZExtValue()))) { in SimplifyMultipleUseDemandedBits() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/IR/ |
| H A D | PatternMatch.cpp | 70 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 77 m_SpecificInt_ICMP(ICmpInst::Predicate::ICMP_EQ, APInt(BitWidth, 0)) in TEST_F() 109 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 148 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 210 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 249 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 288 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 327 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 366 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local 405 unsigned BitWidth = IntTy->getScalarSizeInBits(); in TEST_F() local [all …]
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/ |
| H A D | GISelKnownBits.cpp | 128 KnownBits Mask(BitWidth); in extractBits() 130 BitWidth, WidthKnown.getMaxValue().getLimitedValue(BitWidth)); in extractBits() 132 BitWidth, WidthKnown.getMinValue().getLimitedValue(BitWidth)); in extractBits() 246 Known = KnownBits(BitWidth); in computeKnownBitsImpl() 378 BitWidth > 1) in computeKnownBitsImpl() 387 Known = Known.sext(BitWidth); in computeKnownBitsImpl() 400 Known = Known.anyext(BitWidth); in computeKnownBitsImpl() 470 if (BitWidth > SrcBitWidth) in computeKnownBitsImpl() 515 Known = SrcOpKnown.extractBits(BitWidth, BitWidth * DstIdx); in computeKnownBitsImpl() 564 KnownBits ExtKnown = KnownBits::makeConstant(APInt(BitWidth, BitWidth)); in computeKnownBitsImpl() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/IR/ |
| H A D | ConstantRange.h | 62 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() 350 uint32_t BitWidth) const; 356 ConstantRange zeroExtend(uint32_t BitWidth) const; 362 ConstantRange signExtend(uint32_t BitWidth) const; 368 ConstantRange truncate(uint32_t BitWidth) const; 372 ConstantRange zextOrTrunc(uint32_t BitWidth) const; [all …]
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | PatternInit.cpp | 37 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()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | SIRegisterInfo.cpp | 2397 if (BitWidth <= 64) in getAnyVGPRClassForBitWidth() 2399 if (BitWidth <= 96) in getAnyVGPRClassForBitWidth() 2421 if (BitWidth <= 64) in getAlignedVGPRClassForBitWidth() 2423 if (BitWidth <= 96) in getAlignedVGPRClassForBitWidth() 2445 if (BitWidth == 1) in getVGPRClassForBitWidth() 2447 if (BitWidth <= 16) in getVGPRClassForBitWidth() 2449 if (BitWidth <= 32) in getVGPRClassForBitWidth() 2457 if (BitWidth <= 64) in getAnyAGPRClassForBitWidth() 2459 if (BitWidth <= 96) in getAnyAGPRClassForBitWidth() 2481 if (BitWidth <= 64) in getAlignedAGPRClassForBitWidth() [all …]
|
| /llvm-project-15.0.7/clang/lib/Basic/Targets/ |
| H A D | AVR.h | 156 IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getIntTypeByWidth() argument 158 return BitWidth == 16 ? (IsSigned ? SignedInt : UnsignedInt) in getIntTypeByWidth() 159 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned); in getIntTypeByWidth() 162 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getLeastIntTypeByWidth() argument 164 return BitWidth == 16 in getLeastIntTypeByWidth() 166 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned); in getLeastIntTypeByWidth()
|
| H A D | WebAssembly.h | 116 IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getIntTypeByWidth() argument 118 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong) in getIntTypeByWidth() 119 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned); in getIntTypeByWidth() 122 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getLeastIntTypeByWidth() argument 124 return BitWidth == 64 in getLeastIntTypeByWidth() 126 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned); in getLeastIntTypeByWidth()
|
| /llvm-project-15.0.7/llvm/lib/InterfaceStub/ |
| H A D | IFSHandler.cpp | 107 IO.mapOptional("BitWidth", Target.BitWidth); in mapping() 212 !CopyStub->Target.BitWidth)) in writeIFSToOutputStream() 240 if (Stub.Target.BitWidth && in overrideIFSTarget() 241 Stub.Target.BitWidth.value() != OverrideBitWidth.value()) { in overrideIFSTarget() 245 Stub.Target.BitWidth = OverrideBitWidth.value(); in overrideIFSTarget() 261 if (Stub.Target.Arch || Stub.Target.BitWidth || Stub.Target.Endianness || in validateIFSTarget() 270 Stub.Target.BitWidth = TargetFromTriple.BitWidth; in validateIFSTarget() 275 if (!Stub.Target.Arch || !Stub.Target.BitWidth || !Stub.Target.Endianness) { in validateIFSTarget() 281 if (!Stub.Target.BitWidth) { in validateIFSTarget() 309 RetTarget.BitWidth = in parseTriple() [all …]
|
| H A D | IFSStub.cpp | 58 !BitWidth; in empty() 61 uint8_t ifs::convertIFSBitWidthToELF(IFSBitWidthType BitWidth) { in convertIFSBitWidthToELF() argument 62 switch (BitWidth) { in convertIFSBitWidthToELF() 97 IFSBitWidthType ifs::convertELFBitWidthToIFS(uint8_t BitWidth) { in convertELFBitWidthToIFS() argument 98 switch (BitWidth) { in convertELFBitWidthToIFS()
|
| /llvm-project-15.0.7/clang/lib/Basic/ |
| H A D | TargetInfo.cpp | 260 if (getCharWidth() == BitWidth) in getIntTypeByWidth() 262 if (getShortWidth() == BitWidth) in getIntTypeByWidth() 264 if (getIntWidth() == BitWidth) in getIntTypeByWidth() 266 if (getLongWidth() == BitWidth) in getIntTypeByWidth() 275 if (getCharWidth() >= BitWidth) in getLeastIntTypeByWidth() 277 if (getShortWidth() >= BitWidth) in getLeastIntTypeByWidth() 279 if (getIntWidth() >= BitWidth) in getLeastIntTypeByWidth() 281 if (getLongWidth() >= BitWidth) in getLeastIntTypeByWidth() 290 if (getHalfWidth() == BitWidth) in getRealTypeByWidth() 292 if (getFloatWidth() == BitWidth) in getRealTypeByWidth() [all …]
|
| /llvm-project-15.0.7/llvm/utils/TableGen/ |
| H A D | CodeEmitterGen.cpp | 62 unsigned BitWidth; member in __anon4443b33a0111::CodeEmitterGen 356 o << " "; emitInstBits(o, APInt(BitWidth, 0)); o << ",\n"; in emitInstructionBaseValues() 371 APInt Value(BitWidth, 0); in emitInstructionBaseValues() 402 BitWidth = 0; in run() 414 BitWidth = std::max(BitWidth, BI->getNumBits()); in run() 421 BitWidth = std::max(BitWidth, BI->getNumBits()); in run() 423 UseAPInt = BitWidth > 64; in run() 477 int NumWords = APInt::getNumWords(BitWidth); in run() 479 << " if (Scratch.getBitWidth() != " << BitWidth << ")\n" in run() 480 << " Scratch = Scratch.zext(" << BitWidth << ");\n" in run() [all …]
|
| H A D | VarLenCodeEmitterGen.cpp | 93 NumBits += S.BitWidth; in VarLenInst() 359 unsigned i = 0U, BitWidth = VLI.size(); in emitInstructionBaseValues() local 362 APInt Value(BitWidth, 0); in emitInstructionBaseValues() 365 while (i < BitWidth && SI != SE) { in emitInstructionBaseValues() 366 unsigned SegmentNumBits = SI->BitWidth; in emitInstructionBaseValues() 419 size_t BitWidth = VLI.size(); in getInstructionCaseForEncoding() local 426 if (BitWidth && !VLI.isFixedValueOnly()) in getInstructionCaseForEncoding() 427 SS.indent(6) << "Scratch = Scratch.zext(" << BitWidth << ");\n"; in getInstructionCaseForEncoding() 434 unsigned NumBits = ES.BitWidth; in getInstructionCaseForEncoding()
|
| /llvm-project-15.0.7/llvm/include/llvm/InterfaceStub/ |
| H A D | IFSStub.h | 70 Optional<IFSBitWidthType> BitWidth; member 76 if (Lhs.Arch != Rhs.Arch || Lhs.BitWidth != Rhs.BitWidth || 118 uint8_t convertIFSBitWidthToELF(IFSBitWidthType BitWidth); 137 IFSBitWidthType convertELFBitWidthToIFS(uint8_t BitWidth);
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | FunctionLoweringInfo.cpp | 422 if (BitWidth > LOI->Known.getBitWidth()) { in GetLiveOutRegInfo() 424 LOI->Known = LOI->Known.anyext(BitWidth); in GetLiveOutRegInfo() 446 unsigned BitWidth = IntVT.getSizeInBits(); in ComputePHILiveOutRegInfo() local 462 DestLOI.Known = KnownBits(BitWidth); in ComputePHILiveOutRegInfo() 469 Val = CI->getValue().sext(BitWidth); in ComputePHILiveOutRegInfo() 471 Val = CI->getValue().zext(BitWidth); in ComputePHILiveOutRegInfo() 490 assert(DestLOI.Known.Zero.getBitWidth() == BitWidth && in ComputePHILiveOutRegInfo() 491 DestLOI.Known.One.getBitWidth() == BitWidth && in ComputePHILiveOutRegInfo() 498 DestLOI.Known = KnownBits(BitWidth); in ComputePHILiveOutRegInfo() 505 Val = CI->getValue().sext(BitWidth); in ComputePHILiveOutRegInfo() [all …]
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Operator.cpp | 172 const DataLayout &DL, unsigned BitWidth, in collectOffset() argument 175 assert(BitWidth == DL.getIndexSizeInBits(getPointerAddressSpace()) && in collectOffset() 179 Index = Index.sextOrTrunc(BitWidth); in collectOffset() 180 APInt IndexedSize = APInt(BitWidth, Size); in collectOffset() 207 CollectConstantOffset(APInt(BitWidth, SL->getElementOffset(ElementIdx)), in collectOffset() 219 APInt(BitWidth, DL.getTypeAllocSize(GTI.getIndexedType())); in collectOffset() 223 VariableOffsets.insert({V, APInt(BitWidth, 0)}); in collectOffset()
|
| /llvm-project-15.0.7/llvm/include/llvm/CodeGen/ |
| H A D | ValueTypes.h | 58 static EVT getFloatingPointVT(unsigned BitWidth) { in getFloatingPointVT() 59 return MVT::getFloatingPointVT(BitWidth); in getFloatingPointVT() 64 static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) { in getIntegerVT() 65 MVT M = MVT::getIntegerVT(BitWidth); in getIntegerVT() 68 return getExtendedIntegerVT(Context, BitWidth); in getIntegerVT() 388 unsigned BitWidth = getSizeInBits(); in getRoundIntegerType() local 389 if (BitWidth <= 8) in getRoundIntegerType() 391 return getIntegerVT(Context, 1 << Log2_32_Ceil(BitWidth)); in getRoundIntegerType() 494 static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth);
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | apint-or.ll | 3 ; These tests are for Integer BitWidth <= 64 && BitWidth % 2 != 0. 30 ; These tests are for Integer BitWidth > 64 && BitWidth <= 1024.
|