/external/llvm/unittests/Support/ |
D | MathExtrasTest.cpp | 37 TEST(MathExtras, countLeadingZeros) { in TEST() argument 42 EXPECT_EQ(8u, countLeadingZeros(Z8)); in TEST() 43 EXPECT_EQ(16u, countLeadingZeros(Z16)); in TEST() 44 EXPECT_EQ(32u, countLeadingZeros(Z32)); in TEST() 45 EXPECT_EQ(64u, countLeadingZeros(Z64)); in TEST() 51 EXPECT_EQ(2u, countLeadingZeros(NZ8)); in TEST() 52 EXPECT_EQ(10u, countLeadingZeros(NZ16)); in TEST() 53 EXPECT_EQ(26u, countLeadingZeros(NZ32)); in TEST() 54 EXPECT_EQ(58u, countLeadingZeros(NZ64)); in TEST() 56 EXPECT_EQ(8u, countLeadingZeros(0x00F000FFu)); in TEST() [all …]
|
/external/llvm/lib/Target/PowerPC/MCTargetDesc/ |
D | PPCMCTargetDesc.h | 66 MB = countLeadingZeros(Val); in isRunOfOnes() 68 ME = countLeadingZeros((Val - 1) ^ Val); in isRunOfOnes() 74 ME = countLeadingZeros(Val) - 1; in isRunOfOnes() 76 MB = countLeadingZeros((Val - 1) ^ Val) + 1; in isRunOfOnes()
|
/external/llvm/include/llvm/Support/ |
D | MathExtras.h | 178 std::size_t countLeadingZeros(T Val, ZeroBehavior ZB = ZB_Width) { 212 return countLeadingZeros(Val, ZB_Undefined) ^ 395 return countLeadingZeros(~Value, ZB); 469 return 31 - countLeadingZeros(Value); 475 return 63 - countLeadingZeros(Value); 482 return 32 - countLeadingZeros(Value - 1); 488 return 64 - countLeadingZeros(Value - 1); 596 return 1ull << (63 - countLeadingZeros(A, ZB_Undefined));
|
D | ScaledNumber.h | 89 int Shift = 64 - Width - countLeadingZeros(Digits); 196 int32_t LocalFloor = sizeof(Digits) * 8 - countLeadingZeros(Digits) - 1; in getLgImpl() 308 int32_t ShiftL = std::min<int32_t>(countLeadingZeros(LDigits), ScaleDiff); in matchScales() 429 static int countLeadingZeros32(uint32_t N) { return countLeadingZeros(N); } in countLeadingZeros32() 430 static int countLeadingZeros64(uint64_t N) { return countLeadingZeros(N); } in countLeadingZeros64()
|
/external/llvm/lib/Support/ |
D | ScaledNumber.cpp | 47 unsigned LeadingZeros = countLeadingZeros(Upper); in multiply64() 65 if (int Zeros = countLeadingZeros(Dividend64)) { in divide32() 97 if (int Zeros = countLeadingZeros(Dividend)) { in divide64()
|
D | APInt.cpp | 708 return llvm::countLeadingZeros(MSW) - (APINT_BITS_PER_WORD - BitsInMSW); in countLeadingZerosSlowCase() 715 Count += llvm::countLeadingZeros(pVal[i-1]); in countLeadingZerosSlowCase() 1534 unsigned shift = countLeadingZeros(v[n-1]); in KnuthDiv() 2063 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov() 2075 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov()
|
D | raw_ostream.cpp | 412 unsigned Nibbles = (64 - countLeadingZeros(FN.HexValue)+3)/4; in operator <<()
|
/external/llvm/include/llvm/ADT/ |
D | APInt.h | 1298 unsigned getActiveBits() const { return BitWidth - countLeadingZeros(); } in getActiveBits() 1362 unsigned countLeadingZeros() const { in countLeadingZeros() function 1365 return llvm::countLeadingZeros(VAL) - unusedBits; in countLeadingZeros() 1383 return isNegative() ? countLeadingOnes() : countLeadingZeros(); in getNumSignBits() 1522 unsigned logBase2() const { return BitWidth - 1 - countLeadingZeros(); } in logBase2() 1526 return BitWidth - (*this - 1).countLeadingZeros(); in ceilLogBase2()
|
/external/llvm/unittests/ADT/ |
D | APIntTest.cpp | 41 EXPECT_EQ(0u, Minus1.countLeadingZeros()); in TEST() 55 EXPECT_EQ(0u, i33minus2.countLeadingZeros()); in TEST() 68 EXPECT_EQ(65u, i65.countLeadingZeros()); in TEST() 77 EXPECT_EQ(0u, i65minus.countLeadingZeros()); in TEST() 87 EXPECT_EQ(0u, u128max.countLeadingZeros()); in TEST() 94 EXPECT_EQ(64u, u64max.countLeadingZeros()); in TEST() 103 EXPECT_EQ(128u, zero.countLeadingZeros()); in TEST() 113 EXPECT_EQ(127u, one.countLeadingZeros()); in TEST()
|
/external/llvm/lib/Target/XCore/ |
D | XCoreISelDAGToDAG.cpp | 60 int msksize = 32 - countLeadingZeros(value); in immMskBitp() 142 SDValue MskSize = getI32Imm(32 - countLeadingZeros((uint32_t)Val), dl); in Select()
|
/external/llvm/lib/Target/ARM/MCTargetDesc/ |
D | ARMUnwindOpAsm.cpp | 109 auto RangeMSB = 32 - countLeadingZeros(Regs); in EmitVFPRegSave()
|
D | ARMAddressingModes.h | 299 unsigned RotAmt = countLeadingZeros(V); in getT2SOImmValRotateVal()
|
/external/llvm/lib/Target/ARM/ |
D | Thumb2InstrInfo.cpp | 304 unsigned RotAmt = countLeadingZeros(ThisVal); in emitT2RegPlusImmediate() 321 unsigned RotAmt = countLeadingZeros(ThisVal); in emitT2RegPlusImmediate() 510 unsigned RotAmt = countLeadingZeros<unsigned>(Offset); in rewriteT2FrameIndex()
|
/external/llvm/lib/Target/AArch64/MCTargetDesc/ |
D | AArch64AddressingModes.h | 299 int len = 31 - countLeadingZeros((N << 6) | (~imms & 0x3f)); in decodeLogicalImmediate() 328 int len = 31 - countLeadingZeros((N << 6) | (~imms & 0x3f)); in isValidDecodeLogicalImmediate()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineSimplifyDemanded.cpp | 529 unsigned NLZ = DemandedMask.countLeadingZeros(); in SimplifyDemandedUseBits() 638 if (DemandedMask.countLeadingZeros() <= ShiftAmt) in SimplifyDemandedUseBits() 742 unsigned NLZ = DemandedMask.countLeadingZeros(); in SimplifyDemandedUseBits()
|
D | InstCombineAndOrXor.cpp | 353 MB = BitWidth - ((V - 1) ^ V).countLeadingZeros(); in isRunOfOnes() 382 if ((Mask->getValue().countLeadingZeros() + in FoldLogicalPlusAnd() 402 if ((Mask->getValue().countLeadingZeros() + in FoldLogicalPlusAnd() 1328 uint32_t Zeros = AndRHSMask.countLeadingZeros(); in visitAnd() 1669 if (BitMask.getBitWidth() - BitMask.countLeadingZeros() - InputBitNo != in CollectBitParts()
|
D | InstCombineAddSub.cpp | 879 int Op0ZeroPosition = BitWidth - Op0KnownZeroTemp.countLeadingZeros() - 1; in checkRippleForAdd() 881 int Op1OnePosition = BitWidth - Op1MaybeOne.countLeadingZeros() - 1; in checkRippleForAdd()
|
/external/llvm/lib/Analysis/ |
D | DemandedBits.cpp | 118 std::min(BitWidth, KnownOne.countLeadingZeros()+1)); in determineLiveOperandBits()
|
D | ValueTracking.cpp | 240 unsigned NLZ = (CLHS->getValue()+1).countLeadingZeros(); in computeKnownBitsAddSub() 249 unsigned NLZ2 = CLHS->getValue().countLeadingZeros(); in computeKnownBitsAddSub() 388 (Range.getUnsignedMax() ^ Range.getUnsignedMin()).countLeadingZeros(); in computeKnownBitsFromRangeMetadata() 1135 unsigned RHSUnknownLeadingOnes = KnownOne2.countLeadingZeros(); in computeKnownBitsFromOperator() 1506 APInt(BitWidth, BitsPossiblySet).countLeadingZeros(); in computeKnownBitsFromOperator() 1982 if (KnownOne.countLeadingZeros() < BitWidth - ShiftVal) in isKnownNonZero() 2363 return std::max(FirstAnswer, std::min(TyBits, Mask.countLeadingZeros())); in ComputeNumSignBits()
|
D | VectorUtils.cpp | 551 llvm::countLeadingZeros(LeaderDemandedBits); in computeMinimumValueSizes()
|
D | BlockFrequencyInfoImpl.cpp | 211 Shift = 33 - countLeadingZeros(Total); in normalize()
|
/external/llvm/lib/Target/AArch64/ |
D | AArch64TargetTransformInfo.cpp | 35 unsigned LZ = countLeadingZeros((uint64_t)Val); in getIntImmCost()
|
D | AArch64ExpandPseudoInsts.cpp | 528 unsigned LZ = countLeadingZeros(Imm); in expandMOVImm()
|
/external/llvm/lib/IR/ |
D | ConstantRange.cpp | 780 APInt Zeros(getBitWidth(), getUnsignedMax().countLeadingZeros()); in shl()
|
/external/clang/lib/Lex/ |
D | LiteralSupport.cpp | 1172 multi_char_too_long |= (LitVal.countLeadingZeros() < 8); in CharLiteralParser()
|