reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/ADT/APInt.h
 1794     unsigned lg = logBase2();
 1803     return logBase2();
lib/Analysis/ScalarEvolution.cpp
 1923                                MulLHS->getAPInt().logBase2();
 3174           IntegerType::get(getContext(), RHSC->getAPInt().logBase2());
lib/Analysis/ScalarEvolutionExpander.cpp
  840         if (RHS->logBase2() == RHS->getBitWidth() - 1)
  843                            ConstantInt::get(Ty, RHS->logBase2()), NWFlags,
  863                          ConstantInt::get(Ty, RHS.logBase2()),
lib/Analysis/ValueTracking.cpp
 2415         return std::min(TyBits, NumBits + Denominator->logBase2());
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
 3394     unsigned Log2Val = (-ConstValue1).logBase2();
 3425           MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2();
 3425           MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2();
13361             cast<ConstantSDNode>(Op1)->getAPIntValue() == AndConst.logBase2()) {
19939     unsigned ShCt = XType.getSizeInBits() - N2C->getAPIntValue().logBase2() - 1;
20133                        DAG.getConstant(N2C->getAPIntValue().logBase2(),
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 3922           unsigned Amt = ElementSize.logBase2();
lib/CodeGen/SelectionDAG/TargetLowering.cpp
 2907   const unsigned KeptBits = I1.logBase2();
 2908   const unsigned KeptBitsMinusOne = I01.logBase2();
 3622           unsigned ShCt = AndRHS->getAPIntValue().logBase2();
 3632           unsigned ShCt = C1.logBase2();
 7188       SDValue ShiftAmt = DAG.getConstant(C.logBase2(), dl, ShiftAmtTy);
lib/Support/APInt.cpp
  539   unsigned log = tmp.logBase2();
lib/Target/AArch64/AArch64FastISel.cpp
  803     unsigned Val = C->getValue().logBase2();
 1262       uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2();
 1648       uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2();
 2349             TestBit = C->getValue().logBase2();
 4695       uint64_t ShiftVal = C->getValue().logBase2();
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 2629   unsigned FBits = IntVal.logBase2();
lib/Target/AArch64/AArch64ISelLowering.cpp
 6501   unsigned MaskBits = APInt(32, NumElts * 2).logBase2();
 9431       ShiftAmt = SCVMinus1.logBase2();
 9434       ShiftAmt = CVPlus1.logBase2();
 9444       ShiftAmt = CVNegPlus1.logBase2();
 9448       ShiftAmt = CVNegMinus1.logBase2();
lib/Target/ARM/ARMISelLowering.cpp
14011   unsigned BitInX = AndC->logBase2();
14388     unsigned ShiftAmount = TrueConst->logBase2();
lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
 2179               V1C->getAPIntValue().logBase2(), SDLoc(N),
 2209               V1C->getAPIntValue().logBase2(), SDLoc(NewRoot),
lib/Target/Mips/MipsSEISelLowering.cpp
  764     APInt Floor = APInt(BitWidth, 1) << Val.logBase2();
  805                        DAG.getConstant(C.logBase2(), DL, ShiftTy));
  808   APInt Floor = APInt(BitWidth, 1) << C.logBase2();
lib/Target/PowerPC/PPCISelLowering.cpp
15376                     DAG.getConstant((MulAmtAbs - 1).logBase2(), DL, VT));
15393                     DAG.getConstant((MulAmtAbs + 1).logBase2(), DL, VT));
lib/Target/X86/X86ISelLowering.cpp
20764       unsigned ShiftAmt = BitWidth - C1->getAPIntValue().logBase2() - 1;
37623         unsigned ShAmt = TrueC->getAPIntValue().logBase2();
lib/Transforms/InstCombine/InstCombineAddSub.cpp
 1237           ExtendAmt = TySizeBits - RHSVal.logBase2() - 1;
 1239           ExtendAmt = TySizeBits - XorRHS->getValue().logBase2() - 1;
lib/Transforms/InstCombine/InstCombineCasts.cpp
  901         uint32_t ShAmt = KnownZeroMask.logBase2();
lib/Transforms/InstCombine/InstCombineCompares.cpp
 1180                    ConstantInt::get(A->getType(), AP2.logBase2()));
 1986     unsigned CLog2 = C.logBase2();
 2016     return new ICmpInst(Pred, Y, ConstantInt::get(ShiftType, C.logBase2()));
 4203         Pow2.logBase2() == cast<IntegerType>(A->getType())->getBitWidth())
 4618         unsigned MaskWidth = CVal.logBase2();
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  105     return ConstantInt::get(Ty, IVal->logBase2());
  121     Elts.push_back(ConstantInt::get(Ty->getScalarType(), IVal->logBase2()));
lib/Transforms/InstCombine/InstCombineSelect.cpp
  204   unsigned ValZeros = ValC.logBase2();
  205   unsigned AndZeros = AndMask.logBase2();
  612     C1Log = C1->logBase2();
  643   unsigned C2Log = C2->logBase2();
 2039   unsigned NewBitWidth = (*MaxValue + 1).logBase2() + 1;
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  848               Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2()));
  909               Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2()));
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  608     ConstantInt *Exponent = ConstantInt::get(DeltaType, IndexOffset.logBase2());
  614         ConstantInt::get(DeltaType, (-IndexOffset).logBase2());
lib/Transforms/Utils/SimplifyLibCalls.cpp
 1528       double N = NI.logBase2() * (IsReciprocal ? -1.0 : 1.0);
tools/clang/lib/Sema/SemaChecking.cpp
10366         unsigned log2 = divisor.logBase2(); // floor(log_2(divisor))
unittests/ADT/APIntTest.cpp
 1394   EXPECT_EQ(APInt(15, 7).logBase2(), 2U);
 1397   EXPECT_EQ(APInt(15, 8).logBase2(), 3U);
 1400   EXPECT_EQ(APInt(15, 9).logBase2(), 3U);
 1650   EXPECT_EQ(A2.nearestLogBase2(), A2.logBase2());
 1667   EXPECT_EQ(A5.nearestLogBase2(), A5.logBase2());