Home
last modified time | relevance | path

Searched refs:countl_zero (Results 1 – 25 of 74) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/
H A DPPCMCTargetDesc.h82 MB = llvm::countl_zero(Val); in isRunOfOnes64()
84 ME = llvm::countl_zero((Val - 1) ^ Val); in isRunOfOnes64()
90 ME = llvm::countl_zero(Val) - 1; in isRunOfOnes64()
92 MB = llvm::countl_zero((Val - 1) ^ Val) + 1; in isRunOfOnes64()
106 MB = llvm::countl_zero(Val);
108 ME = llvm::countl_zero((Val - 1) ^ Val);
114 ME = llvm::countl_zero(Val) - 1;
116 MB = llvm::countl_zero((Val - 1) ^ Val) + 1;
/freebsd/contrib/llvm-project/libcxx/include/__bit/
H A Dcountl.h98 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr int countl_zero(_Tp __t) noexcept { in countl_zero() function
104 …return __t != numeric_limits<_Tp>::max() ? std::countl_zero(static_cast<_Tp>(~__t)) : numeric_limi… in countl_one()
H A Dbit_log2.h27 return numeric_limits<_Tp>::digits - 1 - std::countl_zero(__t); in __bit_log2()
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DScaledNumber.cpp47 unsigned LeadingZeros = llvm::countl_zero(Upper); in multiply64()
65 if (int Zeros = llvm::countl_zero(Dividend64)) { in divide32()
97 if (int Zeros = llvm::countl_zero(Dividend)) { in divide64()
H A DKnownBits.cpp97 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub()
100 KnownOut.Zero.setHighBits(MaxVal.countl_zero()); in computeForAddSub()
125 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub()
816 unsigned LeadZ = HasOverflow ? 0 : UMaxResult.countl_zero(); in mul()
H A DAPInt.cpp637 Count += llvm::countl_zero(V); in countLeadingZerosSlowCase()
1293 unsigned shift = llvm::countl_zero(v[n - 1]); in KnuthDiv()
1942 if (countl_zero() + RHS.countl_zero() + 2 <= BitWidth) { in umul_ov()
1968 Overflow = ShAmt >= countl_zero(); in sshl_ov()
1984 Overflow = ShAmt > countl_zero(); in ushl_ov()
2975 return A.getBitWidth() - ((A ^ B).countl_zero() + 1); in GetMostSignificantDifferentBit()
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A Dbit.h281 template <typename T> [[nodiscard]] int countl_zero(T Val) {
297 return llvm::countl_zero<T>(~Value);
320 return std::numeric_limits<T>::digits - llvm::countl_zero(Value);
H A DAPInt.h1472 unsigned getActiveBits() const { return BitWidth - countl_zero(); } in getActiveBits()
1557 unsigned countl_zero() const { in countl_zero() function
1560 return llvm::countl_zero(U.VAL) - unusedBits; in countl_zero()
1565 unsigned countLeadingZeros() const { return countl_zero(); } in countLeadingZeros()
1588 return isNegative() ? countl_one() : countl_zero(); in getNumSignBits()
H A DSmallBitVector.h245 return NumBaseBits - llvm::countl_zero(Bits) - 1; in find_last()
319 return NumBaseBits - llvm::countl_zero(Bits) - 1; in find_prev()
H A DConcurrentHashtable.h148 size_t LeadingZerosNumber = countl_zero(HashMask); in MultiThreadAllocator()
/freebsd/contrib/llvm-project/libcxx/modules/std/
H A Dbit.cppm
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DMathExtras.h341 return 31 - llvm::countl_zero(Value); in Log2_32()
347 return 63 - llvm::countl_zero(Value); in Log2_64()
354 return 32 - llvm::countl_zero(Value - 1); in Log2_32_Ceil()
360 return 64 - llvm::countl_zero(Value - 1); in Log2_64_Ceil()
H A DKnownBits.h269 unsigned countMaxLeadingZeros() const { return One.countl_zero(); } in countMaxLeadingZeros()
272 unsigned countMaxLeadingOnes() const { return Zero.countl_zero(); } in countMaxLeadingOnes()
H A DScaledNumber.h308 int32_t ShiftL = std::min<int32_t>(llvm::countl_zero(LDigits), ScaleDiff); in matchScales()
429 static int countLeadingZeros32(uint32_t N) { return llvm::countl_zero(N); } in countLeadingZeros32()
430 static int countLeadingZeros64(uint64_t N) { return llvm::countl_zero(N); } in countLeadingZeros64()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSimplifyDemanded.cpp190 unsigned NLZ = DemandedMask.countl_zero(); in SimplifyDemandedUseBits()
428 C->ule(DemandedMask.countl_zero())) { in SimplifyDemandedUseBits()
528 unsigned NLZ = DemandedMask.countl_zero(); in SimplifyDemandedUseBits()
571 unsigned NLZ = DemandedMask.countl_zero(); in SimplifyDemandedUseBits()
706 if (unsigned CTLZ = DemandedMask.countl_zero()) { in SimplifyDemandedUseBits()
740 if (DemandedMask.countl_zero() >= ShiftAmt) { in SimplifyDemandedUseBits()
811 bool ShiftedInBitsDemanded = DemandedMask.countl_zero() < ShiftAmt; in SimplifyDemandedUseBits()
923 unsigned NLZ = DemandedMask.countl_zero(); in SimplifyDemandedUseBits()
1221 unsigned NLZ = DemandedMask.countl_zero(); in SimplifyMultipleUseDemandedBits()
1242 unsigned NLZ = DemandedMask.countl_zero(); in SimplifyMultipleUseDemandedBits()
/freebsd/contrib/llvm-project/lldb/source/Breakpoint/
H A DWatchpointAlgorithms.cpp68 return 1ULL << (64 - llvm::countl_zero(input)); in bit_ceil()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantRange.cpp1578 unsigned EqualLeadingBits = (Min ^ Max).countl_zero(); in shl()
1596 if (OtherMax.ugt(Max.countl_zero())) in shl()
1825 APInt(getBitWidth(), (getUpper() - 1).countl_zero()), in ctlz()
1826 APInt(getBitWidth(), (getLower() + 1).countl_zero() + 1)); in ctlz()
1830 APInt(getBitWidth(), getLower().countl_zero() + 1)); in ctlz()
1838 return getNonEmpty(APInt(getBitWidth(), getUnsignedMax().countl_zero()), in ctlz()
1839 APInt(getBitWidth(), getUnsignedMin().countl_zero() + 1)); in ctlz()
1855 unsigned LCPLength = (Lower ^ (Upper - 1)).countl_zero(); in getUnsignedCountTrailingZerosRange()
1921 unsigned LCPLength = (Lower ^ Max).countl_zero(); in getUnsignedPopCountRange()
H A DDIExpressionOptimizer.cpp62 if ((uint64_t)countl_zero(Const1) < Const2) in foldOperationIfPossible()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DBDCE.cpp122 if (Demanded.countl_zero() >= (DestBitSize - SrcBitSize)) { in bitTrackingDCE()
/freebsd/contrib/llvm-project/libcxx/include/
H A Dbit43 constexpr int countl_zero(T x) noexcept; // C++20
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/
H A DAArch64AddressingModes.h300 int len = 31 - llvm::countl_zero((N << 6) | (~imms & 0x3f)); in decodeLogicalImmediate()
329 int len = 31 - llvm::countl_zero((N << 6) | (~imms & 0x3f)); in isValidDecodeLogicalImmediate()
/freebsd/contrib/llvm-project/llvm/lib/Target/VE/
H A DVE.h363 return llvm::countl_zero(Val) | 0x40; // (m)0 in val2MImm()
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DIntegral.h147 return llvm::countl_zero<ReprT>(V);
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/
H A DARMAddressingModes.h291 unsigned RotAmt = llvm::countl_zero(V); in getT2SOImmValRotateVal()
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DThumb2InstrInfo.cpp419 unsigned RotAmt = llvm::countl_zero(ThisVal); in emitT2RegPlusImmediate()
624 unsigned RotAmt = llvm::countl_zero<unsigned>(Offset); in rewriteT2FrameIndex()

123