Home
last modified time | relevance | path

Searched refs:countLeadingZeros (Results 1 – 25 of 46) sorted by relevance

12

/external/llvm/unittests/Support/
DMathExtrasTest.cpp37 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/
DPPCMCTargetDesc.h65 MB = countLeadingZeros(Val); in isRunOfOnes()
67 ME = countLeadingZeros((Val - 1) ^ Val); in isRunOfOnes()
73 ME = countLeadingZeros(Val) - 1; in isRunOfOnes()
75 MB = countLeadingZeros((Val - 1) ^ Val) + 1; in isRunOfOnes()
/external/llvm/include/llvm/Support/
DMathExtras.h174 std::size_t countLeadingZeros(T Val, ZeroBehavior ZB = ZB_Width) {
208 return countLeadingZeros(Val, ZB_Undefined) ^
391 return countLeadingZeros(~Value, ZB);
456 return 31 - countLeadingZeros(Value);
462 return 63 - countLeadingZeros(Value);
469 return 32 - countLeadingZeros(Value - 1);
475 return 64 - countLeadingZeros(Value - 1);
583 return 1ull << (63 - countLeadingZeros(A, ZB_Undefined));
DScaledNumber.h89 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/
DScaledNumber.cpp47 unsigned LeadingZeros = countLeadingZeros(Upper); in multiply64()
65 if (int Zeros = countLeadingZeros(Dividend64)) { in divide32()
97 if (int Zeros = countLeadingZeros(Dividend)) { in divide64()
DAPInt.cpp708 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()
2073 Overflow = ShAmt.uge(countLeadingZeros()); in sshl_ov()
2085 Overflow = ShAmt.ugt(countLeadingZeros()); in ushl_ov()
Draw_ostream.cpp412 unsigned Nibbles = (64 - countLeadingZeros(FN.HexValue)+3)/4; in operator <<()
/external/llvm/include/llvm/ADT/
DAPInt.h1290 unsigned getActiveBits() const { return BitWidth - countLeadingZeros(); } in getActiveBits()
1354 unsigned countLeadingZeros() const { in countLeadingZeros() function
1357 return llvm::countLeadingZeros(VAL) - unusedBits; in countLeadingZeros()
1375 return isNegative() ? countLeadingOnes() : countLeadingZeros(); in getNumSignBits()
1514 unsigned logBase2() const { return BitWidth - 1 - countLeadingZeros(); } in logBase2()
1518 return BitWidth - (*this - 1).countLeadingZeros(); in ceilLogBase2()
/external/llvm/unittests/ADT/
DAPIntTest.cpp33 EXPECT_EQ(0u, Minus1.countLeadingZeros()); in TEST()
47 EXPECT_EQ(0u, i33minus2.countLeadingZeros()); in TEST()
60 EXPECT_EQ(65u, i65.countLeadingZeros()); in TEST()
69 EXPECT_EQ(0u, i65minus.countLeadingZeros()); in TEST()
79 EXPECT_EQ(0u, u128max.countLeadingZeros()); in TEST()
86 EXPECT_EQ(64u, u64max.countLeadingZeros()); in TEST()
95 EXPECT_EQ(128u, zero.countLeadingZeros()); in TEST()
105 EXPECT_EQ(127u, one.countLeadingZeros()); in TEST()
/external/llvm/lib/Target/XCore/
DXCoreISelDAGToDAG.cpp60 int msksize = 32 - countLeadingZeros(value); in immMskBitp()
141 SDValue MskSize = getI32Imm(32 - countLeadingZeros((uint32_t)Val)); in Select()
/external/llvm/lib/Target/ARM/MCTargetDesc/
DARMUnwindOpAsm.cpp109 auto RangeMSB = 32 - countLeadingZeros(Regs); in EmitVFPRegSave()
DARMAddressingModes.h299 unsigned RotAmt = countLeadingZeros(V); in getT2SOImmValRotateVal()
/external/llvm/lib/Target/ARM/
DThumb2InstrInfo.cpp303 unsigned RotAmt = countLeadingZeros(ThisVal); in emitT2RegPlusImmediate()
320 unsigned RotAmt = countLeadingZeros(ThisVal); in emitT2RegPlusImmediate()
509 unsigned RotAmt = countLeadingZeros<unsigned>(Offset); in rewriteT2FrameIndex()
/external/llvm/lib/Target/AArch64/MCTargetDesc/
DAArch64AddressingModes.h299 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/
DInstCombineSimplifyDemanded.cpp535 unsigned NLZ = DemandedMask.countLeadingZeros(); in SimplifyDemandedUseBits()
615 uint32_t NLZ = DemandedMask.countLeadingZeros(); in SimplifyDemandedUseBits()
722 if (DemandedMask.countLeadingZeros() <= ShiftAmt) in SimplifyDemandedUseBits()
826 unsigned NLZ = DemandedMask.countLeadingZeros(); in SimplifyDemandedUseBits()
DInstCombineAddSub.cpp879 int Op0ZeroPosition = BitWidth - Op0KnownZeroTemp.countLeadingZeros() - 1; in checkRippleForAdd()
881 int Op1OnePosition = BitWidth - Op1MaybeOne.countLeadingZeros() - 1; in checkRippleForAdd()
DInstCombineAndOrXor.cpp353 MB = BitWidth - ((V - 1) ^ V).countLeadingZeros(); in isRunOfOnes()
383 if ((Mask->getValue().countLeadingZeros() + in FoldLogicalPlusAnd()
403 if ((Mask->getValue().countLeadingZeros() + in FoldLogicalPlusAnd()
1279 uint32_t Zeros = AndRHSMask.countLeadingZeros(); in visitAnd()
/external/llvm/lib/Transforms/Scalar/
DBDCE.cpp132 std::min(BitWidth, KnownOne.countLeadingZeros()+1)); in determineLiveOperandBits()
/external/llvm/lib/Analysis/
DValueTracking.cpp203 unsigned NLZ = (CLHS->getValue()+1).countLeadingZeros(); in computeKnownBitsAddSub()
212 unsigned NLZ2 = CLHS->getValue().countLeadingZeros(); in computeKnownBitsAddSub()
348 unsigned LeadingZeros = (Upper->getValue() - 1).countLeadingZeros(); in computeKnownBitsFromRangeMetadata()
1118 unsigned RHSUnknownLeadingOnes = KnownOne2.countLeadingZeros(); in computeKnownBits()
2094 return std::max(FirstAnswer, std::min(TyBits, Mask.countLeadingZeros())); in ComputeNumSignBits()
DBlockFrequencyInfoImpl.cpp211 Shift = 33 - countLeadingZeros(Total); in normalize()
DInstructionSimplify.cpp2284 } else if (Val.countLeadingZeros() < Width - 1) { in SimplifyICmpInst()
2297 Upper = Lower.shl(Lower.countLeadingZeros()) + 1; in SimplifyICmpInst()
2306 unsigned ShiftAmount = CI2->getValue().countLeadingZeros() - 1; in SimplifyICmpInst()
/external/llvm/lib/Target/AArch64/
DAArch64TargetTransformInfo.cpp35 unsigned LZ = countLeadingZeros((uint64_t)Val); in getIntImmCost()
DAArch64ExpandPseudoInsts.cpp517 unsigned LZ = countLeadingZeros(Imm); in expandMOVImm()
/external/llvm/lib/IR/
DConstantRange.cpp727 APInt Zeros(getBitWidth(), getUnsignedMax().countLeadingZeros()); in shl()
/external/clang/lib/Lex/
DLiteralSupport.cpp1176 multi_char_too_long |= (LitVal.countLeadingZeros() < 8); in CharLiteralParser()

12