| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | DivisionByConstantInfo.cpp | 25 assert(D.getBitWidth() >= 3 && "Does not work at smaller bitwidths."); in get() 28 APInt SignedMin = APInt::getSignedMinValue(D.getBitWidth()); in get() 32 APInt T = SignedMin + (D.lshr(D.getBitWidth() - 1)); in get() 34 unsigned P = D.getBitWidth() - 1; // initialize P in get() 63 Retval.ShiftAmount = P - D.getBitWidth(); // resulting shift in get() 77 assert(D.getBitWidth() > 1 && "Does not work at smaller bitwidths."); in get() 83 APInt::getLowBitsSet(D.getBitWidth(), D.getBitWidth() - LeadingZeros); in get() 84 APInt SignedMin = APInt::getSignedMinValue(D.getBitWidth()); in get() 85 APInt SignedMax = APInt::getSignedMaxValue(D.getBitWidth()); in get() 90 unsigned P = D.getBitWidth() - 1; // initialize P in get() [all …]
|
| H A D | KnownBits.cpp | 22 unsigned SignBitPosition = Val.getBitWidth() - 1; in flipSignBit() 55 assert(Carry.getBitWidth() == 1 && "Carry must be 1-bit"); in computeForAddCarry() 63 unsigned BitWidth = LHS.getBitWidth(); in computeForAddSub() 148 assert(Borrow.getBitWidth() == 1 && "Borrow must be 1-bit"); in computeForSubBorrow() 159 unsigned BitWidth = getBitWidth(); in sextInReg() 183 MaskedVal.clearLowBits(getBitWidth() - N); in makeGE() 218 unsigned SignBitPosition = Val.getBitWidth() - 1; in smin() 263 unsigned SignBitPosition = LHS.getBitWidth() - 1; in abds() 287 unsigned BitWidth = LHS.getBitWidth(); in shl() 372 unsigned BitWidth = LHS.getBitWidth(); in lshr() [all …]
|
| H A D | APInt.cpp | 146 reallocate(RHS.getBitWidth()); in assignSlowCase() 241 APInt Result(getMemory(getNumWords()), getBitWidth()); in operator *() 383 unsigned NewWidth = getBitWidth() + NewLSB.getBitWidth(); in concatSlowCase() 385 Result.insertBits(*this, NewLSB.getBitWidth()); in concatSlowCase() 398 unsigned subBitWidth = subBits.getBitWidth(); in insertBits() 631 assert(getBitWidth() % SplatSizeInBits == 0 && in isSplat() 652 assert(NewLen >= V.getBitWidth() && "Can't splat to smaller bit width!"); in getSplat() 655 for (unsigned I = V.getBitWidth(); I < NewLen; I <<= 1) in getSplat() 1126 unsigned rotBitWidth = rotateAmt.getBitWidth(); in rotateModulo() 1133 rot = rot.urem(APInt(rot.getBitWidth(), BitWidth)); in rotateModulo() [all …]
|
| H A D | SlowDynamicAPInt.cpp | 118 return std::max(A.getBitWidth(), B.getBitWidth()); in getMaxWidth() 235 unsigned Width = std::max(Val.getBitWidth(), O.Val.getBitWidth()); in operator %() 242 APInt Ret = Val.sext(2 * Val.getBitWidth()); in operator -()
|
| H A D | APFixedPoint.cpp | 50 NewVal = NewVal.extend(NewVal.getBitWidth() + RelativeUpscale); in convert() 54 NewVal.getBitWidth(), in convert() 56 NewVal.getBitWidth())); in convert() 378 Amt = std::min(Amt, ThisVal.getBitWidth()); in shl() 408 IntPart = IntPart.extend(IntPart.getBitWidth() + Lsb); in toString() 550 Value.getBitWidth(), Value.isSigned()); in getFromIntValue()
|
| /freebsd/contrib/llvm-project/llvm/lib/IR/ |
| H A D | ConstantRange.cpp | 54 assert(Lower.getBitWidth() == Upper.getBitWidth() && in ConstantRange() 63 return getEmpty(Known.getBitWidth()); in fromKnownBits() 65 return getFull(Known.getBitWidth()); in fromKnownBits() 84 return KnownBits(getBitWidth()); in toKnownBits() 99 uint32_t BW = getBitWidth(); in splitPosNeg() 114 uint32_t W = CR.getBitWidth(); in makeAllowedICmpRegion() 218 Offset = APInt(getBitWidth(), 0); in getEquivalentICmp() 221 RHS = APInt(getBitWidth(), 0); in getEquivalentICmp() 289 unsigned BitWidth = V.getBitWidth(); in makeExactMulNUWRegion() 291 return ConstantRange::getFull(V.getBitWidth()); in makeExactMulNUWRegion() [all …]
|
| H A D | ConstantRangeList.cpp | 48 assert(getBitWidth() == NewRange.getBitWidth()); in insert() 91 assert(getBitWidth() == SubRange.getBitWidth()); in subtract() 153 assert(getBitWidth() == CRL.getBitWidth() && in unionWith() 160 ConstantRange PreviousRange(getBitWidth(), false); in unionWith() 204 assert(getBitWidth() == CRL.getBitWidth() && in intersectWith()
|
| H A D | Operator.cpp | 116 assert(Offset.getBitWidth() == in accumulateConstantOffset() 131 Offset += CI->getValue().sextOrTrunc(Offset.getBitWidth()); in accumulateConstantOffset() 139 Index = Index.sextOrTrunc(Offset.getBitWidth()); in accumulateConstantOffset() 141 APInt IndexedSize(Offset.getBitWidth(), Size, /*isSigned=*/false, in accumulateConstantOffset() 183 APInt(Offset.getBitWidth(), SL->getElementOffset(ElementIdx)), in accumulateConstantOffset()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | KnownBits.h | 44 unsigned getBitWidth() const { in getBitWidth() function 45 assert(Zero.getBitWidth() == One.getBitWidth() && in getBitWidth() 47 return Zero.getBitWidth(); in getBitWidth() 55 return Zero.popcount() + One.popcount() == getBitWidth(); in isConstant() 166 unsigned OldBitWidth = getBitWidth(); in zext() 180 if (BitWidth > getBitWidth()) in anyextOrTrunc() 182 if (BitWidth < getBitWidth()) in anyextOrTrunc() 190 if (BitWidth > getBitWidth()) in zextOrTrunc() 192 if (BitWidth < getBitWidth()) in zextOrTrunc() 200 if (BitWidth > getBitWidth()) in sextOrTrunc() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | ConstantRangeList.h | 39 assert(empty() || R.getBitWidth() == getBitWidth()); in ConstantRangeList() 65 uint32_t getBitWidth() const { return Ranges.front().getBitWidth(); } in getBitWidth() function
|
| H A D | ConstantRange.h | 52 return ConstantRange(getBitWidth(), false); in getEmpty() 57 return ConstantRange(getBitWidth(), true); in getFull() 86 return getFull(Lower.getBitWidth()); in getNonEmpty() 215 uint32_t getBitWidth() const { return Lower.getBitWidth(); } in getBitWidth() function
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | APSInt.h | 326 if (I1.getBitWidth() == I2.getBitWidth() && I1.isSigned() == I2.isSigned()) in compareValues() 330 if (I1.getBitWidth() > I2.getBitWidth()) in compareValues() 331 return compareValues(I1, I2.extend(I1.getBitWidth())); in compareValues() 332 if (I2.getBitWidth() > I1.getBitWidth()) in compareValues() 333 return compareValues(I1.extend(I2.getBitWidth()), I2); in compareValues() 385 return LHS.getBitWidth() == RHS.getBitWidth() &&
|
| H A D | APInt.h | 554 if (I1.getBitWidth() == I2.getBitWidth()) in isSameValue() 557 if (I1.getBitWidth() > I2.getBitWidth()) in isSameValue() 558 return I1 == I2.zext(I1.getBitWidth()); in isSameValue() 560 return I1.zext(I2.getBitWidth()) == I2; in isSameValue() 949 unsigned NewWidth = getBitWidth() + NewLSB.getBitWidth(); in concat() 951 return APInt(NewWidth, (U.VAL << NewLSB.getBitWidth()) | NewLSB.U.VAL); in concat() 1044 assert(bitPosition < getBitWidth() && "Bit position out of bounds!"); 1488 unsigned getBitWidth() const { return BitWidth; } in getBitWidth() function 2440 return LHS.getBitWidth() == RHS.getBitWidth() && LHS == RHS;
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | InterleavedLoadCombinePass.cpp | 191 A = APInt(Ty->getBitWidth(), 0); in Polynomial() 209 if (ErrorMSBs > A.getBitWidth()) in incErrorMSBs() 210 ErrorMSBs = A.getBitWidth(); in incErrorMSBs() 242 if (C.getBitWidth() != A.getBitWidth()) { in add() 303 if (C.getBitWidth() != A.getBitWidth()) { in mul() 460 if (C.getBitWidth() != A.getBitWidth()) { in lshr() 470 if (shiftAmt >= C.getBitWidth()) in lshr() 471 return mul(APInt(C.getBitWidth(), 0)); in lshr() 479 ErrorMSBs = A.getBitWidth(); in lshr() 492 if (n < A.getBitWidth()) { in sextOrTrunc() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | CmpInstAnalysis.cpp | 108 Result.Mask = APInt::getSignMask(C.getBitWidth()); in decomposeBitTestICmp() 109 Result.C = APInt::getZero(C.getBitWidth()); in decomposeBitTestICmp() 114 APInt FlippedSign = C ^ APInt::getSignMask(C.getBitWidth()); in decomposeBitTestICmp() 118 Result.C = APInt::getSignMask(C.getBitWidth()); in decomposeBitTestICmp() 137 Result.C = APInt::getZero(C.getBitWidth()); in decomposeBitTestICmp()
|
| H A D | BasicAliasAnalysis.cpp | 290 unsigned getBitWidth() const { in getBitWidth() function 338 assert(N.getBitWidth() == V->getType()->getPrimitiveSizeInBits() && in evaluateWith() 340 if (TruncBits) N = N.trunc(N.getBitWidth() - TruncBits); in evaluateWith() 341 if (SExtBits) N = N.sext(N.getBitWidth() + SExtBits); in evaluateWith() 342 if (ZExtBits) N = N.zext(N.getBitWidth() + ZExtBits); in evaluateWith() 347 assert(N.getBitWidth() == V->getType()->getPrimitiveSizeInBits() && in evaluateWith() 349 if (TruncBits) N = N.truncate(N.getBitWidth() - TruncBits); in evaluateWith() 352 ConstantRange(APInt::getZero(N.getBitWidth()), in evaluateWith() 353 APInt::getSignedMinValue(N.getBitWidth()))); in evaluateWith() 354 if (SExtBits) N = N.signExtend(N.getBitWidth() + SExtBits); in evaluateWith() [all …]
|
| H A D | ScalarEvolutionDivision.cpp | 112 uint32_t NumeratorBW = NumeratorVal.getBitWidth(); in visitConstant() 113 uint32_t DenominatorBW = DenominatorVal.getBitWidth(); in visitConstant() 120 APInt QuotientVal(NumeratorVal.getBitWidth(), 0); in visitConstant() 121 APInt RemainderVal(NumeratorVal.getBitWidth(), 0); in visitConstant()
|
| H A D | HashRecognize.cpp | 195 unsigned ICmpBW = KnownL.getBitWidth(); in computeInstr() 206 unsigned ICmpBW = KnownR.getBitWidth(); in computeInstr() 454 if (N == Known.getBitWidth()) in checkExtractBits() 459 unsigned BitPos = ByteOrderSwapped ? 0 : Known.getBitWidth() - N; in checkExtractBits() 462 Known.extractBits(Known.getBitWidth() - N, SwappedBitPos).isUnknown(); in checkExtractBits() 470 unsigned BW = GenPoly.getBitWidth(); in genSarwateTable() 637 unsigned N = std::min(TC, ResultBits.getBitWidth()); in recognizeCRC() 680 << "CRC-" << Info.RHS.getBitWidth() << " loop with trip count " in print()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | StraightLineStrengthReduce.cpp | 296 return Index->getBitWidth() <= 64 && in isAddFoldable() 419 APInt One(Idx->getBitWidth(), 1); in allocateCandidatesAndFindBasisForAdd() 519 APInt One(RHS->getBitWidth(), 1); in factorArrayIndex() 573 if (A.getBitWidth() < B.getBitWidth()) in unifyBitWidth() 574 A = A.sext(B.getBitWidth()); in unifyBitWidth() 575 else if (A.getBitWidth() > B.getBitWidth()) in unifyBitWidth() 576 B = B.sext(A.getBitWidth()); in unifyBitWidth() 598 IntegerType::get(Basis.Ins->getContext(), IndexOffset.getBitWidth()); in emitBump()
|
| H A D | InductiveRangeCheckElimination.cpp | 305 unsigned BitWidth = cast<IntegerType>(T)->getBitWidth(); in parseIvAgaisntLimit() 447 if (Ty->getBitWidth() > MaxTypeSizeForOverflowCheck) in reassociateSubLHS() 450 auto WideTy = IntegerType::get(Ty->getContext(), Ty->getBitWidth() * 2); in reassociateSubLHS() 589 if (RTy->getBitWidth() < MainLoopStructure.ExitCountTy->getBitWidth()) in calculateSubRanges() 678 if (IVType->getBitWidth() > RCType->getBitWidth()) in computeSafeIterationSpace() 717 unsigned BitWidth = RCType->getBitWidth(); in computeSafeIterationSpace() 823 if (EndType->getBitWidth() > RCType->getBitWidth()) { in computeSafeIterationSpace() 824 assert(EndType->getBitWidth() == RCType->getBitWidth() * 2); in computeSafeIterationSpace()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ |
| H A D | TargetLoweringObjectFile.cpp | 296 if ((ITy->getBitWidth() == 8 || ITy->getBitWidth() == 16 || in getKindForGlobal() 297 ITy->getBitWidth() == 32) && in getKindForGlobal() 299 if (ITy->getBitWidth() == 8) in getKindForGlobal() 301 if (ITy->getBitWidth() == 16) in getKindForGlobal() 304 assert(ITy->getBitWidth() == 32 && "Unknown width"); in getKindForGlobal()
|
| /freebsd/contrib/llvm-project/clang/lib/Lex/ |
| H A D | PPExpressions.cpp | 60 unsigned getBitWidth() const { return Val.getBitWidth(); } in getBitWidth() function in __anon807bcb150111::PPValue 427 if (Result.Val.getBitWidth() > Val.getBitWidth()) { in EvaluateValue() 428 Result.Val = Val.extend(Result.Val.getBitWidth()); in EvaluateValue() 430 assert(Result.Val.getBitWidth() == Val.getBitWidth() && in EvaluateValue() 639 PPValue RHS(LHS.getBitWidth()); in EvaluateDirectiveSubExpr() 683 llvm::APSInt Res(LHS.getBitWidth()); in EvaluateDirectiveSubExpr() 754 if (ShAmt >= LHS.getBitWidth()) { in EvaluateDirectiveSubExpr() 756 ShAmt = LHS.getBitWidth()-1; in EvaluateDirectiveSubExpr() 835 PPValue AfterColonVal(LHS.getBitWidth()); in EvaluateDirectiveSubExpr()
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
| H A D | RangedConstraintManager.cpp | 121 if (ComparisonType.getBitWidth() == WraparoundType.getBitWidth() && in assumeSymInclusiveRange() 189 if (ComparisonType.getBitWidth() == WraparoundType.getBitWidth() && in assumeSymRel()
|
| H A D | BasicValueFactory.cpp | 275 if (V2.isNegative() || V2.getBitWidth() > 64) in evalAPSInt() 280 if (Amt >= V1.getBitWidth()) in evalAPSInt() 290 if (V2.isNegative() || V2.getBitWidth() > 64) in evalAPSInt() 295 if (Amt >= V1.getBitWidth()) in evalAPSInt()
|
| /freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | APSIntType.h | 28 : BitWidth(Value.getBitWidth()), IsUnsigned(Value.isUnsigned()) {} in APSIntType() 30 uint32_t getBitWidth() const { return BitWidth; } in getBitWidth() function
|