Home
last modified time | relevance | path

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

12

/freebsd/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.cpp88 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in getExtMask()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DStraightLineStrengthReduce.cpp602 ConstantInt *Exponent = ConstantInt::get(DeltaType, IndexOffset.logBase2()); in emitBump()
608 ConstantInt::get(DeltaType, (-IndexOffset).logBase2()); in emitBump()
H A DSeparateConstOffsetFromGEP.cpp922 Idx, ConstantInt::get(PtrIndexTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
982 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToArithmetics()
H A DLoopIdiomRecognize.cpp2776 BitPos = ConstantInt::get(CurrX->getType(), Res->Mask.logBase2()); in detectShiftUntilBitTestIdiom()
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPInt.h1761 unsigned logBase2() const { return getActiveBits() - 1; } in logBase2() function
1786 return logBase2(); in exactLogBase2()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp652 if (RHS->logBase2() == RHS->getBitWidth() - 1) in visitMulExpr()
655 ConstantInt::get(Ty, RHS->logBase2()), NWFlags, in visitMulExpr()
673 ConstantInt::get(SC->getType(), RHS.logBase2()), in visitUDivExpr()
H A DSimplifyLibCalls.cpp2167 double N = NI.logBase2() * (IsReciprocal ? -1.0 : 1.0); in replacePowWithExp()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp1521 MulC->logBase2() == ShAmtC) { in visitLShr()
1560 MulC->logBase2() == ShAmtC) { in visitLShr()
1795 MulC->logBase2() == ShAmt && in visitAShr()
H A DInstCombineSelect.cpp173 unsigned ValZeros = ValC.logBase2(); in foldSelectICmpAnd()
174 unsigned AndZeros = AndMask.logBase2(); in foldSelectICmpAnd()
781 unsigned C1Log = AndMask.logBase2(); in foldSelectICmpAndBinOp()
805 unsigned C2Log = C2->logBase2(); in foldSelectICmpAndBinOp()
H A DInstCombineAddSub.cpp965 ShAmt = BitWidth - C->logBase2() - 1; in foldAddWithConstant()
967 ShAmt = BitWidth - C2->logBase2() - 1; in foldAddWithConstant()
H A DInstCombineCasts.cpp1008 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp()
H A DInstCombineCompares.cpp1018 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
1485 return new ICmpInst(Pred, Y, ConstantInt::get(SrcTy, C.logBase2())); in foldICmpTruncConstant()
2304 unsigned CLog2 = Div.logBase2(); in foldICmpShlLHSC()
H A DInstCombineMulDivRem.cpp266 (*MulAP - 1).isPowerOf2() && *ShiftC == MulAP->logBase2()) { in visitMul()
H A DInstCombineCalls.cpp1202 unsigned NewBitWidth = (*MaxValue + 1).logBase2() + 1; in matchSAddSubSat()
H A DInstructionCombining.cpp4280 ConstantInt::get(WO->getLHS()->getType(), C->logBase2())); in foldExtractOfOverflowIntrinsic()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64FastISel.cpp809 unsigned Val = C->getValue().logBase2(); in computeAddress()
1248 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitAddSub()
1619 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitLogicalOp()
2313 TestBit = C->getValue().logBase2(); in emitCompareAndBranch()
4674 uint64_t ShiftVal = C->getValue().logBase2(); in selectMul()
H A DAArch64ISelLowering.cpp13374 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in isEXTMask()
18975 M = APInt(BitWidth, SCVMinus1.logBase2()); in performMulCombine()
18992 M = APInt(BitWidth, CVPlus1.logBase2()); in performMulCombine()
19014 ShiftAmt = SCVMinus1.logBase2(); in performMulCombine()
19017 ShiftAmt = CVPlus1.logBase2(); in performMulCombine()
19020 ShiftAmt = SCVPlus1.logBase2() + TrailingZeroes; in performMulCombine()
19027 unsigned ShiftM1 = CVMMinus1.logBase2(); in performMulCombine()
19028 unsigned ShiftN1 = CVNMinus1.logBase2(); in performMulCombine()
19064 ShiftAmt = CVNegPlus1.logBase2(); in performMulCombine()
19067 ShiftAmt = CVNegMinus1.logBase2(); in performMulCombine()
[all …]
H A DAArch64TargetTransformInfo.cpp2511 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
2518 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DAPInt.cpp607 unsigned log = tmp.logBase2(); in getBitsNeeded()
1188 unsigned lg = logBase2(); in nearestLogBase2()
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonISelDAGToDAG.cpp2358 V1C->getAPIntValue().logBase2(), SDLoc(N), in balanceSubTree()
2388 V1C->getAPIntValue().logBase2(), SDLoc(NewRoot), in balanceSubTree()
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/
H A DMipsSEISelLowering.cpp803 APInt Floor = APInt(BitWidth, 1) << Val.logBase2(); in shouldTransformMulToShiftsAddsSubs()
844 DAG.getConstant(C.logBase2(), DL, ShiftTy)); in genConstMult()
847 APInt Floor = APInt(BitWidth, 1) << C.logBase2(); in genConstMult()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstants.cpp2650 return ConstantInt::get(Ty, IVal->logBase2()); in getExactLogBase2()
2669 Elts.push_back(ConstantInt::get(Ty->getScalarType(), IVal->logBase2())); in getExactLogBase2()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2949 return (-UnmaskedC).logBase2(); in SimplifyDemandedBits()
4352 const unsigned KeptBits = I1.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
4353 const unsigned KeptBitsMinusOne = I01.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
5333 unsigned ShCt = AndRHS->getAPIntValue().logBase2(); in SimplifySetCC()
5344 unsigned ShCt = C1.logBase2(); in SimplifySetCC()
11475 SDValue ShiftAmt = DAG.getShiftAmountConstant(C.logBase2(), VT, dl); in expandMULO()
H A DDAGCombiner.cpp4043 DivC->getAPIntValue().logBase2() == ShC->getAPIntValue()) in foldRemainderIdiom()
4711 unsigned Log2Val = (-ConstValue1).logBase2(); in visitMUL()
4770 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
19309 Op1->getAsAPIntVal() == AndConst.logBase2()) { in rebuildSetCC()
28592 unsigned ShCt = XType.getSizeInBits() - N2C->getAPIntValue().logBase2() - 1; in foldSelectCCToShiftAnd()
28877 unsigned ShCt = N2C->getAPIntValue().logBase2(); in SimplifySelectCC()
29086 return DAG.getConstant(Pow2Constants.back().logBase2(), DL, VT); in takeInexpensiveLog2()
29090 DAG.getConstant(Pow2Constants.back().logBase2(), DL, in takeInexpensiveLog2()
29095 DAG.getConstant(Pow2.logBase2(), DL, VT.getScalarType())); in takeInexpensiveLog2()

12