Home
last modified time | relevance | path

Searched refs:isPowerOf2 (Results 1 – 25 of 40) sorted by relevance

12

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DCmpInstAnalysis.cpp108 if (!C->isPowerOf2()) in decomposeBitTestICmp()
115 if (!(*C + 1).isPowerOf2()) in decomposeBitTestICmp()
122 if (!(*C + 1).isPowerOf2()) in decomposeBitTestICmp()
129 if (!C->isPowerOf2()) in decomposeBitTestICmp()
DTargetTransformInfo.cpp551 if (CI->getValue().isPowerOf2()) in getOperandInfo()
572 if (CI->getValue().isPowerOf2()) in getOperandInfo()
578 if (CI->getValue().isPowerOf2()) in getOperandInfo()
DLoads.cpp44 assert(APAlign.isPowerOf2() && "must be a power of 2!"); in isAligned()
DBranchProbabilityInfo.cpp709 if (AndRHS->getValue().isPowerOf2()) in calcZeroHeuristics()
DScalarEvolutionExpander.cpp861 if (RHS.isPowerOf2()) in visitUDivExpr()
2165 if (SC->getAPInt().isPowerOf2()) { in isHighCostExpansionHelper()
DValueTracking.cpp1304 if (RA.isPowerOf2()) { in computeKnownBitsFromOperator()
1338 if (RA.isPowerOf2()) { in computeKnownBitsFromOperator()
1902 if ((~(LHSBits.Zero & RHSBits.Zero)).isPowerOf2()) in isKnownToBeAPowerOfTwo()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/
DInstCombineCompares.cpp1195 if (AP1.isAllOnesValue() && !AP2.isPowerOf2()) in foldICmpShrConstConst()
1270 if (!CI2->getValue().isPowerOf2()) in processUGT_ADDCST_ADD()
1613 if (*XorC == ~C && (C + 1).isPowerOf2()) in foldICmpXorConstant()
1616 if (*XorC == C && (C + 1).isPowerOf2()) in foldICmpXorConstant()
1621 if (*XorC == -C && C.isPowerOf2()) in foldICmpXorConstant()
1625 if (*XorC == C && (-C).isPowerOf2()) in foldICmpXorConstant()
1748 if ((~(*C2) + 1).isPowerOf2()) { in foldICmpAndConstConst()
1852 if (Cmp.getOperand(1) == Y && (-C).isPowerOf2()) { in foldICmpAndConstant()
1895 if ((C + 1).isPowerOf2()) { in foldICmpOrConstant()
1969 bool CIsPowerOf2 = C.isPowerOf2(); in foldICmpShlOne()
[all …]
DInstCombineAndOrXor.cpp133 if (AndRHSV.isPowerOf2()) { in OptAndOp()
236 bool IsAPow2 = (ACst && !ACst->isZero() && ACst->getValue().isPowerOf2()); in getMaskedICmpType()
237 bool IsBPow2 = (BCst && !BCst->isZero() && BCst->getValue().isPowerOf2()); in getMaskedICmpType()
507 (BCst->getValue() & (BCst->getValue() ^ DCst->getValue())).isPowerOf2()) { in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
830 if (Xor.isPowerOf2()) { in foldAndOrOfEqualityCmpsWithConstants()
959 assert(HighestBit.isPowerOf2() && "expected to be power of two (non-zero)"); in foldSignedTruncationCheck()
1011 if (!OtherHighestBit.isPowerOf2()) in foldSignedTruncationCheck()
1209 if ((PredL == ICmpInst::ICMP_ULT && LHSC->getValue().isPowerOf2()) || in foldAndOfICmps()
2228 if (LAddOpnd == RAddOpnd && DiffC.isPowerOf2()) { in foldOrOfICmps()
2244 if (LowRangeDiff.isPowerOf2() && LowRangeDiff == HighRangeDiff && in foldOrOfICmps()
DInstCombineMulDivRem.cpp104 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getLogBase2()
119 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getLogBase2()
239 if (Val.isNegative() && PosVal.isPowerOf2()) { in visitMul()
1075 if (I.isExact() && Op1C->isNonNegative() && Op1C->isPowerOf2()) { in visitSDiv()
DInstCombineAddSub.cpp985 if (match(E, m_And(m_Value(Op), m_APInt(AI))) && (*AI + 1).isPowerOf2()) { in MatchRem()
1240 if (RHSVal.isPowerOf2()) in visitAdd()
1242 else if (XorRHS->getValue().isPowerOf2()) in visitAdd()
1260 if (LHS->hasOneUse() && (XorRHS->getValue()+1).isPowerOf2()) { in visitAdd()
DInstCombineCasts.cpp884 if ((Op1CV->isNullValue() || Op1CV->isPowerOf2()) && in transformZExtICmp()
891 if (KnownZeroMask.isPowerOf2()) { // Exactly 1 possible 1? in transformZExtICmp()
1255 ICI->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp()
1259 if (KnownZeroMask.isPowerOf2()) { in transformSExtICmp()
DInstCombineSelect.cpp152 if (!AndMask.isPowerOf2()) in foldSelectICmpAnd()
198 if (!TC.isPowerOf2() && !FC.isPowerOf2()) in foldSelectICmpAnd()
2172 if (!(*MaxValue + 1).isPowerOf2() || -*MinValue != *MaxValue + 1) in matchSAddSubSat()
DInstCombineSimplifyDemanded.cpp637 if (RA.isPowerOf2()) { in SimplifyDemandedUseBits()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/ADT/
DAPInt.h373 return isNegative() && isPowerOf2(); in isMinSignedValue()
391 bool isPowerOf2() const { in isPowerOf2() function
1548 if (!isPowerOf2()) in exactLogBase2()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DStraightLineStrengthReduce.cpp607 if (IndexOffset.isPowerOf2()) { in emitBump()
612 if ((-IndexOffset).isPowerOf2()) { in emitBump()
DSeparateConstOffsetFromGEP.cpp847 if (ElementSize.isPowerOf2()) { in lowerToSingleIndexGEPs()
908 if (ElementSize.isPowerOf2()) { in lowerToArithmetics()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/
DAArch64FastISel.cpp569 if (C->getValue().isPowerOf2()) in isMulPowOf2()
572 if (C->getValue().isPowerOf2()) in isMulPowOf2()
798 if (C->getValue().isPowerOf2()) in computeAddress()
1258 if (C->getValue().isPowerOf2()) in emitAddSub()
1644 if (C->getValue().isPowerOf2()) in emitLogicalOp()
2344 if (C->getValue().isPowerOf2()) in emitCompareAndBranch()
2348 if (C->getValue().isPowerOf2()) { in emitCompareAndBranch()
4696 if (C->getValue().isPowerOf2()) in selectMul()
4701 if (C->getValue().isPowerOf2()) { in selectMul()
4936 !(C.isPowerOf2() || (-C).isPowerOf2())) in selectSDiv()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/SystemZ/
DSystemZTargetTransformInfo.cpp387 (CVal->getValue().isPowerOf2() || (-CVal->getValue()).isPowerOf2())) in getArithmeticInstrCost()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/
DAPInt.h468 bool isPowerOf2() const { in isPowerOf2() function
1846 if (!isPowerOf2()) in exactLogBase2()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/
DPatternMatch.h431 bool isValue(const APInt &C) { return C.isPowerOf2(); } in isValue()
443 bool isValue(const APInt &C) { return (-C).isPowerOf2(); } in isValue()
455 bool isValue(const APInt &C) { return !C || C.isPowerOf2(); } in isValue()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/
DTargetLowering.cpp2958 return I1.ugt(I01) && I1.isPowerOf2() && I01.isPowerOf2(); in optimizeSetCCOfSignedTruncationCheck()
3229 if ((C->getAPIntValue()+1).isPowerOf2()) { in SimplifySetCC()
3694 if (AndRHS->getAPIntValue().isPowerOf2() && in SimplifySetCC()
3704 if (C1.isPowerOf2() && in SimplifySetCC()
3722 if ((-AndRHSC).isPowerOf2() && (AndRHSC & C1) == C1) { in SimplifySetCC()
7474 if (C.isPowerOf2()) { in expandMULO()
DSelectionDAG.cpp3186 if (RA.isPowerOf2()) { in computeKnownBits()
3210 if (RA.isPowerOf2()) { in computeKnownBits()
3461 return Const->getAPIntValue().zextOrTrunc(BitWidth).isPowerOf2(); in isKnownToBeAPowerOfTwo()
3483 return C->getAPIntValue().zextOrTrunc(BitWidth).isPowerOf2(); in isKnownToBeAPowerOfTwo()
7192 cast<ConstantSDNode>(N->getScale())->getAPIntValue().isPowerOf2() && in getMaskedGather()
7230 cast<ConstantSDNode>(N->getScale())->getAPIntValue().isPowerOf2() && in getMaskedScatter()
DDAGCombiner.cpp3505 if (N1IsConst && !N1IsOpaqueConst && (-ConstValue1).isPowerOf2()) { in visitMUL()
3530 if ((MulC - 1).isPowerOf2()) in visitMUL()
3532 else if ((MulC + 1).isPowerOf2()) in visitMUL()
3809 if (C->getAPIntValue().isPowerOf2()) in visitSDIVLike()
3811 if ((-C->getAPIntValue()).isPowerOf2()) in visitSDIVLike()
4634 if ((C0Val - C1Val).isPowerOf2()) { in foldLogicOfSetCCs()
8042 if (UnknownBits.isPowerOf2()) { in visitSRL()
8465 if (C1Val.isPowerOf2() && C2Val.isNullValue()) { in foldSelectOfConstants()
8850 if (ISD::isConstantSplatVector(N1.getNode(), Pow2C) && Pow2C.isPowerOf2() && in foldVSelectOfConstants()
13584 if (AndConst.isPowerOf2() && in rebuildSetCC()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Hexagon/
DHexagonISelDAGToDAG.cpp2186 if (V1C && NOpcode == ISD::MUL && V1C->getAPIntValue().isPowerOf2()) in balanceSubTree()
2214 if (V1C && V1C->getAPIntValue().isPowerOf2()) { in balanceSubTree()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
DVerifier.cpp4375 Assert(ElementSizeVal.isPowerOf2(), in visitIntrinsicCall()
4620 Assert(Alignment->getValue().isPowerOf2(), in visitIntrinsicCall()
4641 Assert(Alignment->getValue().isPowerOf2(), in visitIntrinsicCall()

12