Home
last modified time | relevance | path

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

12

/llvm-project-15.0.7/llvm/lib/Target/AArch64/GISel/
H A DAArch64PostLegalizerCombiner.cpp186 ShiftAmt = SCVMinus1.logBase2(); in matchAArch64MulConstCombine()
189 ShiftAmt = CVPlus1.logBase2(); in matchAArch64MulConstCombine()
199 ShiftAmt = CVNegPlus1.logBase2(); in matchAArch64MulConstCombine()
203 ShiftAmt = CVNegMinus1.logBase2(); in matchAArch64MulConstCombine()
H A DAArch64PostLegalizerLowering.cpp119 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in getExtMask()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DStraightLineStrengthReduce.cpp619 ConstantInt *Exponent = ConstantInt::get(DeltaType, IndexOffset.logBase2()); in emitBump()
625 ConstantInt::get(DeltaType, (-IndexOffset).logBase2()); in emitBump()
H A DSeparateConstOffsetFromGEP.cpp880 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs()
941 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToArithmetics()
H A DLoopIdiomRecognize.cpp2336 (BitPos = ConstantInt::get(CurrX->getType(), Mask.logBase2())); in detectShiftUntilBitTestIdiom()
/llvm-project-15.0.7/llvm/include/llvm/ADT/
H A DAPInt.h1652 unsigned logBase2() const { return getActiveBits() - 1; } in logBase2() function
1677 return logBase2(); in exactLogBase2()
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DAPIntTest.cpp1415 EXPECT_EQ(APInt(15, 7).logBase2(), 2U); in TEST()
1418 EXPECT_EQ(APInt(15, 8).logBase2(), 3U); in TEST()
1421 EXPECT_EQ(APInt(15, 9).logBase2(), 3U); in TEST()
1653 EXPECT_EQ(A2.nearestLogBase2(), A2.logBase2()); in TEST()
1670 EXPECT_EQ(A5.nearestLogBase2(), A5.logBase2()); in TEST()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp889 if (RHS->logBase2() == RHS->getBitWidth() - 1) in visitMulExpr()
892 ConstantInt::get(Ty, RHS->logBase2()), NWFlags, in visitMulExpr()
912 ConstantInt::get(Ty, RHS.logBase2()), in visitUDivExpr()
H A DSimplifyLibCalls.cpp1847 double N = NI.logBase2() * (IsReciprocal ? -1.0 : 1.0); in replacePowWithExp()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp201 unsigned ValZeros = ValC.logBase2(); in foldSelectICmpAnd()
202 unsigned AndZeros = AndMask.logBase2(); in foldSelectICmpAnd()
625 C1Log = C1->logBase2(); in foldSelectICmpAndOr()
656 unsigned C2Log = C2->logBase2(); in foldSelectICmpAndOr()
H A DInstCombineAddSub.cpp940 ShAmt = BitWidth - C->logBase2() - 1; in foldAddWithConstant()
942 ShAmt = BitWidth - C2->logBase2() - 1; in foldAddWithConstant()
H A DInstCombineCompares.cpp1164 ConstantInt::get(A->getType(), AP2.logBase2())); in foldICmpShrConstConst()
2083 unsigned CLog2 = C.logBase2(); in foldICmpShlOne()
2113 return new ICmpInst(Pred, Y, ConstantInt::get(ShiftType, C.logBase2())); in foldICmpShlOne()
4684 Pow2.logBase2() == cast<IntegerType>(A->getType())->getBitWidth()) in foldICmpEquality()
5175 unsigned MaskWidth = CVal.logBase2(); in processUMulZExtIdiom()
H A DInstCombineShifts.cpp1237 MulC->logBase2() == ShAmtC) in visitLShr()
H A DInstCombineCasts.cpp1039 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp()
H A DInstCombineCalls.cpp895 unsigned NewBitWidth = (*MaxValue + 1).logBase2() + 1; in matchSAddSubSat()
/llvm-project-15.0.7/llvm/lib/Target/AArch64/
H A DAArch64FastISel.cpp786 unsigned Val = C->getValue().logBase2(); in computeAddress()
1234 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitAddSub()
1603 uint64_t ShiftVal = cast<ConstantInt>(MulRHS)->getValue().logBase2(); in emitLogicalOp()
2296 TestBit = C->getValue().logBase2(); in emitCompareAndBranch()
4589 uint64_t ShiftVal = C->getValue().logBase2(); in selectMul()
H A DAArch64TargetTransformInfo.cpp1322 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
1329 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
H A DAArch64ISelLowering.cpp9806 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in isEXTMask()
14327 ShiftAmt = SCVMinus1.logBase2(); in performMulCombine()
14330 ShiftAmt = CVPlus1.logBase2(); in performMulCombine()
14340 ShiftAmt = CVNegPlus1.logBase2(); in performMulCombine()
14344 ShiftAmt = CVNegMinus1.logBase2(); in performMulCombine()
H A DAArch64ISelDAGToDAG.cpp3029 unsigned FBits = IntVal.logBase2(); in SelectCVTFixedPosOperand()
/llvm-project-15.0.7/llvm/lib/Support/
H A DAPInt.cpp568 unsigned log = tmp.logBase2(); in getBitsNeeded()
1150 unsigned lg = logBase2(); in nearestLogBase2()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonISelDAGToDAG.cpp2200 V1C->getAPIntValue().logBase2(), SDLoc(N), in balanceSubTree()
2230 V1C->getAPIntValue().logBase2(), SDLoc(NewRoot), in balanceSubTree()
/llvm-project-15.0.7/llvm/lib/Target/Mips/
H A DMipsSEISelLowering.cpp758 APInt Floor = APInt(BitWidth, 1) << Val.logBase2(); in shouldTransformMulToShiftsAddsSubs()
799 DAG.getConstant(C.logBase2(), DL, ShiftTy)); in genConstMult()
802 APInt Floor = APInt(BitWidth, 1) << C.logBase2(); in genConstMult()
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstants.cpp2723 return ConstantInt::get(Ty, IVal->logBase2()); in getExactLogBase2()
2742 Elts.push_back(ConstantInt::get(Ty->getScalarType(), IVal->logBase2())); in getExactLogBase2()
/llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/
H A DTargetLowering.cpp2653 return (-UnmaskedC).logBase2(); in SimplifyDemandedBits()
3813 const unsigned KeptBits = I1.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
3814 const unsigned KeptBitsMinusOne = I01.logBase2(); in optimizeSetCCOfSignedTruncationCheck()
4759 unsigned ShCt = AndRHS->getAPIntValue().logBase2(); in SimplifySetCC()
4769 unsigned ShCt = C1.logBase2(); in SimplifySetCC()
9309 SDValue ShiftAmt = DAG.getConstant(C.logBase2(), dl, ShiftAmtTy); in expandMULO()
H A DDAGCombiner.cpp4014 unsigned Log2Val = (-ConstValue1).logBase2(); in visitMUL()
4055 MathOp == ISD::ADD ? (MulC - 1).logBase2() : (MulC + 1).logBase2(); in visitMUL()
16083 cast<ConstantSDNode>(Op1)->getAPIntValue() == AndConst.logBase2()) { in rebuildSetCC()
23917 unsigned ShCt = XType.getSizeInBits() - N2C->getAPIntValue().logBase2() - 1; in foldSelectCCToShiftAnd()
24205 unsigned ShCt = N2C->getAPIntValue().logBase2(); in SimplifySelectCC()

12