Home
last modified time | relevance | path

Searched refs:logBase2 (Results 1 – 24 of 24) sorted by relevance

/freebsd-12.1/contrib/llvm/lib/Transforms/Scalar/
H A DStraightLineStrengthReduce.cpp609 ConstantInt *Exponent = ConstantInt::get(DeltaType, IndexOffset.logBase2()); in emitBump()
615 ConstantInt::get(DeltaType, (-IndexOffset).logBase2()); in emitBump()
H A DSeparateConstOffsetFromGEP.cpp849 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
910 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToArithmetics()
/freebsd-12.1/contrib/llvm/include/llvm/ADT/
H A DAPInt.h1748 unsigned logBase2() const { return getActiveBits() - 1; } in logBase2() function
1782 unsigned lg = logBase2(); in nearestLogBase2()
1791 return logBase2(); in exactLogBase2()
/freebsd-12.1/contrib/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp205 unsigned ValZeros = ValC.logBase2(); in foldSelectICmpAnd()
206 unsigned AndZeros = AndMask.logBase2(); in foldSelectICmpAnd()
561 C1Log = C1->logBase2(); in foldSelectICmpAndOr()
592 unsigned C2Log = C2->logBase2(); in foldSelectICmpAndOr()
H A DInstCombineMulDivRem.cpp106 return ConstantInt::get(Ty, IVal->logBase2()); in getLogBase2()
122 Elts.push_back(ConstantInt::get(Ty->getScalarType(), IVal->logBase2())); in getLogBase2()
H A DInstCombineAddSub.cpp1068 ExtendAmt = TySizeBits - RHSVal.logBase2() - 1; in visitAdd()
1070 ExtendAmt = TySizeBits - XorRHS->getValue().logBase2() - 1; in visitAdd()
H A DInstCombineCompares.cpp1160 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
1862 unsigned CLog2 = C.logBase2(); in foldICmpShlOne()
1892 return new ICmpInst(Pred, Y, ConstantInt::get(ShiftType, C.logBase2())); in foldICmpShlOne()
3623 Pow2.logBase2() == cast<IntegerType>(A->getType())->getBitWidth()) in foldICmpEquality()
4021 unsigned MaskWidth = CVal.logBase2(); in processUMulZExtIdiom()
H A DInstCombineCasts.cpp902 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp()
/freebsd-12.1/contrib/llvm/lib/Target/AArch64/
H A DAArch64FastISel.cpp776 unsigned Val = C->getValue().logBase2(); in computeAddress()
1229 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitAddSub()
1615 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitLogicalOp()
2316 TestBit = C->getValue().logBase2(); in emitCompareAndBranch()
4644 uint64_t ShiftVal = C->getValue().logBase2(); in selectMul()
H A DAArch64ISelLowering.cpp6167 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in isEXTMask()
8955 ShiftAmt = SCVMinus1.logBase2(); in performMulCombine()
8958 ShiftAmt = CVPlus1.logBase2(); in performMulCombine()
8968 ShiftAmt = CVNegPlus1.logBase2(); in performMulCombine()
8972 ShiftAmt = CVNegMinus1.logBase2(); in performMulCombine()
H A DAArch64ISelDAGToDAG.cpp2577 unsigned FBits = IntVal.logBase2(); in SelectCVTFixedPosOperand()
/freebsd-12.1/contrib/llvm/lib/Analysis/
H A DScalarEvolutionExpander.cpp828 ConstantInt::get(Ty, RHS->logBase2())); in visitMulExpr()
846 ConstantInt::get(Ty, RHS.logBase2())); in visitUDivExpr()
H A DValueTracking.cpp2345 return std::min(TyBits, NumBits + Denominator->logBase2()); in ComputeNumSignBitsImpl()
H A DScalarEvolution.cpp1883 MulLHS->getAPInt().logBase2(); in getZeroExtendExpr()
3133 IntegerType::get(getContext(), RHSC->getAPInt().logBase2()); in getURemExpr()
/freebsd-12.1/contrib/llvm/lib/Target/Hexagon/
H A DHexagonISelDAGToDAG.cpp2175 V1C->getAPIntValue().logBase2(), SDLoc(N), in balanceSubTree()
2205 V1C->getAPIntValue().logBase2(), SDLoc(NewRoot), in balanceSubTree()
/freebsd-12.1/contrib/llvm/lib/Target/Mips/
H A DMipsSEISelLowering.cpp735 APInt Floor = APInt(BitWidth, 1) << Val.logBase2(); in shouldTransformMulToShiftsAddsSubs()
797 DAG.getConstant(C.logBase2(), DL, ShiftTy)); in genConstMult()
800 APInt Floor = APInt(BitWidth, 1) << C.logBase2(); in genConstMult()
/freebsd-12.1/contrib/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2176 const unsigned KeptBits = I1.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
2177 const unsigned KeptBitsMinusOne = I01.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
2739 DAG.getConstant(AndRHS->getAPIntValue().logBase2(), dl, in SimplifySetCC()
2748 DAG.getConstant(C1.logBase2(), dl, in SimplifySetCC()
H A DDAGCombiner.cpp2985 unsigned Log2Val = (-ConstValue1).logBase2(); in visitMUL()
3015 unsigned ShAmt = MathOp == ISD::ADD ? (MulC - 1).logBase2() in visitMUL()
3016 : (MulC + 1).logBase2(); in visitMUL()
12448 cast<ConstantSDNode>(Op1)->getAPIntValue() == AndConst.logBase2()) { in rebuildSetCC()
18459 unsigned ShCt = XType.getSizeInBits() - N2C->getAPIntValue().logBase2() - 1; in foldSelectCCToShiftAnd()
18648 DAG.getConstant(N2C->getAPIntValue().logBase2(), in SimplifySelectCC()
H A DSelectionDAGBuilder.cpp3578 unsigned Amt = ElementSize.logBase2(); in visitGetElementPtr()
/freebsd-12.1/contrib/llvm/lib/Support/
H A DAPInt.cpp487 unsigned log = tmp.logBase2(); in getBitsNeeded()
/freebsd-12.1/contrib/llvm/lib/Transforms/Utils/
H A DSimplifyLibCalls.cpp1286 double N = NI.logBase2() * (IsReciprocal ? -1.0 : 1.0); in replacePowWithExp()
/freebsd-12.1/contrib/llvm/lib/Target/ARM/
H A DARMISelLowering.cpp12565 unsigned BitInX = AndC->logBase2(); in PerformCMOVToBFICombine()
12771 unsigned ShiftAmount = TrueConst->logBase2(); in PerformCMOVCombine()
/freebsd-12.1/contrib/llvm/tools/clang/lib/Sema/
H A DSemaChecking.cpp9823 unsigned log2 = divisor.logBase2(); // floor(log_2(divisor)) in GetExprRange()
/freebsd-12.1/contrib/llvm/lib/Target/X86/
H A DX86ISelLowering.cpp34809 unsigned ShAmt = TrueC->getAPIntValue().logBase2(); in combineCMov()
39933 unsigned ShAmt = BitWidth - SplatVal.logBase2() - 1; in combineMOVMSK()