Home
last modified time | relevance | path

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

12

/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/
H A DAArch64PostLegalizerCombiner.cpp198 ShiftAmt = SCVMinus1.logBase2(); in matchAArch64MulConstCombine()
201 ShiftAmt = CVPlus1.logBase2(); in matchAArch64MulConstCombine()
211 ShiftAmt = CVNegPlus1.logBase2(); in matchAArch64MulConstCombine()
215 ShiftAmt = CVNegMinus1.logBase2(); in matchAArch64MulConstCombine()
H A DAArch64PostLegalizerLowering.cpp133 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in getExtMask()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DStraightLineStrengthReduce.cpp600 ConstantInt *Exponent = ConstantInt::get(DeltaType, IndexOffset.logBase2()); in emitBump()
606 ConstantInt::get(DeltaType, (-IndexOffset).logBase2()); in emitBump()
H A DSeparateConstOffsetFromGEP.cpp892 Idx, ConstantInt::get(PtrIndexTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
952 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToArithmetics()
H A DLoopIdiomRecognize.cpp2255 (BitPos = ConstantInt::get(CurrX->getType(), Mask.logBase2())); in detectShiftUntilBitTestIdiom()
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPInt.h1696 unsigned logBase2() const { return getActiveBits() - 1; } in logBase2() function
1721 return logBase2(); in exactLogBase2()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp593 if (RHS->logBase2() == RHS->getBitWidth() - 1) in visitMulExpr()
596 ConstantInt::get(Ty, RHS->logBase2()), NWFlags, in visitMulExpr()
614 ConstantInt::get(SC->getType(), RHS.logBase2()), in visitUDivExpr()
H A DSimplifyLibCalls.cpp2075 double N = NI.logBase2() * (IsReciprocal ? -1.0 : 1.0); in replacePowWithExp()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp202 unsigned ValZeros = ValC.logBase2(); in foldSelectICmpAnd()
203 unsigned AndZeros = AndMask.logBase2(); in foldSelectICmpAnd()
734 C1Log = C1->logBase2(); in foldSelectICmpAndBinOp()
741 C1Log = C1.logBase2(); in foldSelectICmpAndBinOp()
768 unsigned C2Log = C2->logBase2(); in foldSelectICmpAndBinOp()
H A DInstCombineAddSub.cpp952 ShAmt = BitWidth - C->logBase2() - 1; in foldAddWithConstant()
954 ShAmt = BitWidth - C2->logBase2() - 1; in foldAddWithConstant()
H A DInstCombineShifts.cpp1422 MulC->logBase2() == ShAmtC) in visitLShr()
H A DInstCombineCasts.cpp927 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp()
H A DInstCombineCompares.cpp989 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
1438 return new ICmpInst(Pred, Y, ConstantInt::get(SrcTy, C.logBase2())); in foldICmpTruncConstant()
2193 unsigned CLog2 = C.logBase2(); in foldICmpShlOne()
H A DInstCombineCalls.cpp1157 unsigned NewBitWidth = (*MaxValue + 1).logBase2() + 1; in matchSAddSubSat()
H A DInstructionCombining.cpp3420 ConstantInt::get(WO->getLHS()->getType(), C->logBase2())); in foldExtractOfOverflowIntrinsic()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64FastISel.cpp813 unsigned Val = C->getValue().logBase2(); in computeAddress()
1252 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitAddSub()
1621 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitLogicalOp()
2314 TestBit = C->getValue().logBase2(); in emitCompareAndBranch()
4657 uint64_t ShiftVal = C->getValue().logBase2(); in selectMul()
H A DAArch64TargetTransformInfo.cpp1722 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
1729 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
H A DAArch64ISelLowering.cpp11485 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in isEXTMask()
17199 ShiftAmt = SCVMinus1.logBase2(); in performMulCombine()
17202 ShiftAmt = CVPlus1.logBase2(); in performMulCombine()
17205 ShiftAmt = SCVPlus1.logBase2() + TrailingZeroes; in performMulCombine()
17211 unsigned ShiftM1 = CVMMinus1.logBase2(); in performMulCombine()
17212 unsigned ShiftN1 = CVNMinus1.logBase2(); in performMulCombine()
17227 ShiftAmt = CVNegPlus1.logBase2(); in performMulCombine()
17230 ShiftAmt = CVNegMinus1.logBase2(); in performMulCombine()
17233 ShiftAmt = SCVPlus1.logBase2() + TrailingZeroes; in performMulCombine()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonISelDAGToDAG.cpp2248 V1C->getAPIntValue().logBase2(), SDLoc(N), in balanceSubTree()
2278 V1C->getAPIntValue().logBase2(), SDLoc(NewRoot), in balanceSubTree()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Support/
H A DAPInt.cpp576 unsigned log = tmp.logBase2(); in getBitsNeeded()
1158 unsigned lg = logBase2(); in nearestLogBase2()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/Mips/
H A DMipsSEISelLowering.cpp757 APInt Floor = APInt(BitWidth, 1) << Val.logBase2(); in shouldTransformMulToShiftsAddsSubs()
798 DAG.getConstant(C.logBase2(), DL, ShiftTy)); in genConstMult()
801 APInt Floor = APInt(BitWidth, 1) << C.logBase2(); in genConstMult()
/freebsd-14.2/contrib/llvm-project/llvm/lib/IR/
H A DConstants.cpp2489 return ConstantInt::get(Ty, IVal->logBase2()); in getExactLogBase2()
2508 Elts.push_back(ConstantInt::get(Ty->getScalarType(), IVal->logBase2())); in getExactLogBase2()
/freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2850 return (-UnmaskedC).logBase2(); in SimplifyDemandedBits()
4076 const unsigned KeptBits = I1.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
4077 const unsigned KeptBitsMinusOne = I01.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
5045 unsigned ShCt = AndRHS->getAPIntValue().logBase2(); in SimplifySetCC()
5055 unsigned ShCt = C1.logBase2(); in SimplifySetCC()
10485 SDValue ShiftAmt = DAG.getConstant(C.logBase2(), dl, ShiftAmtTy); in expandMULO()
H A DDAGCombiner.cpp4427 unsigned Log2Val = (-ConstValue1).logBase2(); in visitMUL()
4484 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
17973 Op1->getAsAPIntVal() == AndConst.logBase2()) { in rebuildSetCC()
27076 unsigned ShCt = XType.getSizeInBits() - N2C->getAPIntValue().logBase2() - 1; in foldSelectCCToShiftAnd()
27364 unsigned ShCt = N2C->getAPIntValue().logBase2(); in SimplifySelectCC()
27571 return DAG.getConstant(Pow2Constants.back().logBase2(), DL, VT); in takeInexpensiveLog2()
27576 DAG.getConstant(Pow2.logBase2(), DL, VT.getScalarType())); in takeInexpensiveLog2()
/freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp8153 match(UI, m_Shr(m_Specific(X), m_SpecificInt(CmpC.logBase2())))) { in optimizeBranch()

12