| /llvm-project-15.0.7/llvm/lib/Target/AArch64/GISel/ |
| H A D | AArch64PostLegalizerCombiner.cpp | 186 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 D | AArch64PostLegalizerLowering.cpp | 119 unsigned MaskBits = APInt(32, NumElts * 2).logBase2(); in getExtMask()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | StraightLineStrengthReduce.cpp | 619 ConstantInt *Exponent = ConstantInt::get(DeltaType, IndexOffset.logBase2()); in emitBump() 625 ConstantInt::get(DeltaType, (-IndexOffset).logBase2()); in emitBump()
|
| H A D | SeparateConstOffsetFromGEP.cpp | 880 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToSingleIndexGEPs() 941 Idx, ConstantInt::get(IntPtrTy, ElementSize.logBase2())); in lowerToArithmetics()
|
| H A D | LoopIdiomRecognize.cpp | 2336 (BitPos = ConstantInt::get(CurrX->getType(), Mask.logBase2())); in detectShiftUntilBitTestIdiom()
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 1652 unsigned logBase2() const { return getActiveBits() - 1; } in logBase2() function 1677 return logBase2(); in exactLogBase2()
|
| /llvm-project-15.0.7/llvm/unittests/ADT/ |
| H A D | APIntTest.cpp | 1415 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 D | ScalarEvolutionExpander.cpp | 889 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 D | SimplifyLibCalls.cpp | 1847 double N = NI.logBase2() * (IsReciprocal ? -1.0 : 1.0); in replacePowWithExp()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 201 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 D | InstCombineAddSub.cpp | 940 ShAmt = BitWidth - C->logBase2() - 1; in foldAddWithConstant() 942 ShAmt = BitWidth - C2->logBase2() - 1; in foldAddWithConstant()
|
| H A D | InstCombineCompares.cpp | 1164 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 D | InstCombineShifts.cpp | 1237 MulC->logBase2() == ShAmtC) in visitLShr()
|
| H A D | InstCombineCasts.cpp | 1039 uint32_t ShAmt = KnownZeroMask.logBase2(); in transformZExtICmp()
|
| H A D | InstCombineCalls.cpp | 895 unsigned NewBitWidth = (*MaxValue + 1).logBase2() + 1; in matchSAddSubSat()
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/ |
| H A D | AArch64FastISel.cpp | 786 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 D | AArch64TargetTransformInfo.cpp | 1322 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV() 1329 Constant *DivisorLog2 = ConstantInt::get(Int32Ty, Divisor.logBase2()); in instCombineSVESDIV()
|
| H A D | AArch64ISelLowering.cpp | 9806 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 D | AArch64ISelDAGToDAG.cpp | 3029 unsigned FBits = IntVal.logBase2(); in SelectCVTFixedPosOperand()
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | APInt.cpp | 568 unsigned log = tmp.logBase2(); in getBitsNeeded() 1150 unsigned lg = logBase2(); in nearestLogBase2()
|
| /llvm-project-15.0.7/llvm/lib/Target/Hexagon/ |
| H A D | HexagonISelDAGToDAG.cpp | 2200 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 D | MipsSEISelLowering.cpp | 758 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 D | Constants.cpp | 2723 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 D | TargetLowering.cpp | 2653 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 D | DAGCombiner.cpp | 4014 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()
|