Home
last modified time | relevance | path

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

12

/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/
DLongMathTest.java93 boolean isPowerOf2 = LongMath.isPowerOfTwo(x); in testLog2Exact()
96 assertTrue(isPowerOf2); in testLog2Exact()
98 assertFalse(isPowerOf2); in testLog2Exact()
DBigIntegerMathTest.java99 boolean isPowerOf2 = BigIntegerMath.isPowerOfTwo(x); in testLog2Exact()
102 assertTrue(isPowerOf2); in testLog2Exact()
104 assertFalse(isPowerOf2); in testLog2Exact()
DIntMathTest.java91 boolean isPowerOf2 = IntMath.isPowerOfTwo(x); in testLog2Exact()
94 assertTrue(isPowerOf2); in testLog2Exact()
96 assertFalse(isPowerOf2); in testLog2Exact()
/external/apache-commons-math/src/main/java/org/apache/commons/math/transform/
DFastHadamardTransformer.java162 if (!FastFourierTransformer.isPowerOf2(n)) { in fht()
213 if (!FastFourierTransformer.isPowerOf2(n)) { in fht()
DFastFourierTransformer.java484 public static boolean isPowerOf2(long n) { in isPowerOf2() method in FastFourierTransformer
495 if (!isPowerOf2(d.length)) { in verifyDataSet()
508 if (!isPowerOf2(o.length)) { in verifyDataSet()
DFastCosineTransformer.java224 if (!FastFourierTransformer.isPowerOf2(n)) { in fct()
/external/guava/guava-tests/test/com/google/common/math/
DBigIntegerMathTest.java111 boolean isPowerOf2 = BigIntegerMath.isPowerOfTwo(x); in testLog2Exact()
114 assertTrue(isPowerOf2); in testLog2Exact()
116 assertFalse(isPowerOf2); in testLog2Exact()
DIntMathTest.java154 boolean isPowerOf2 = IntMath.isPowerOfTwo(x); in testLog2Exact()
157 assertTrue(isPowerOf2); in testLog2Exact()
159 assertFalse(isPowerOf2); in testLog2Exact()
DLongMathTest.java208 boolean isPowerOf2 = LongMath.isPowerOfTwo(x); in testLog2Exact()
211 assertTrue(isPowerOf2); in testLog2Exact()
213 assertFalse(isPowerOf2); in testLog2Exact()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineCompares.cpp173 return (~CI->getValue() + 1).isPowerOf2(); in isHighOnes()
1155 if (AP1.isAllOnesValue() && !AP2.isPowerOf2()) in FoldICmpCstShrCst()
1303 XorCst->getValue() == ~RHSV && (RHSV + 1).isPowerOf2()) in visitICmpInstWithInstAndIntCst()
1309 XorCst->getValue() == -RHSV && RHSV.isPowerOf2()) in visitICmpInstWithInstAndIntCst()
1525 if (ICI.isEquality() && RHS == LHSI->getOperand(1) && (-RHSV).isPowerOf2()) in visitICmpInstWithInstAndIntCst()
1603 bool RHSVIsPowerOf2 = RHSV.isPowerOf2(); in visitICmpInstWithInstAndIntCst()
1790 RHSV.isPowerOf2() && (LHSV & (RHSV - 1)) == (RHSV - 1)) in visitICmpInstWithInstAndIntCst()
1799 (RHSV + 1).isPowerOf2() && (LHSV & RHSV) == RHSV) in visitICmpInstWithInstAndIntCst()
1837 RHSV.isPowerOf2() && (LHSV & (RHSV - 1)) == 0) in visitICmpInstWithInstAndIntCst()
1846 (RHSV + 1).isPowerOf2() && (LHSV & RHSV) == 0) in visitICmpInstWithInstAndIntCst()
[all …]
DInstCombineSelect.cpp775 if ((TrueVal->getValue() - FalseVal->getValue()).isPowerOf2()) in foldSelectICmpAnd()
777 else if ((FalseVal->getValue() - TrueVal->getValue()).isPowerOf2()) in foldSelectICmpAnd()
790 if (!AndRHS->getValue().isPowerOf2() || in foldSelectICmpAnd()
791 (!TrueVal->getValue().isPowerOf2() && in foldSelectICmpAnd()
792 !FalseVal->getValue().isPowerOf2())) in foldSelectICmpAnd()
DInstCombineAndOrXor.cpp208 if (AndRHSV.isPowerOf2()) { in OptAndOp()
460 ACst->getValue().isPowerOf2()); in getTypeOfMaskedICmp()
462 BCst->getValue().isPowerOf2()); in getTypeOfMaskedICmp()
567 if (!C->getValue().isPowerOf2()) in decomposeBitTestICmp()
574 if (!(C->getValue() + 1).isPowerOf2()) in decomposeBitTestICmp()
919 LHSCst->getValue().isPowerOf2()) { in FoldAndOfICmps()
1848 if (LAddOpnd == RAddOpnd && DiffCst.isPowerOf2()) { in FoldOrOfICmps()
1864 if (LowRangeDiff.isPowerOf2() && LowRangeDiff == HighRangeDiff && in FoldOrOfICmps()
2000 if (Xor.isPowerOf2()) { in FoldOrOfICmps()
DInstCombineAddSub.cpp1089 if (RHSVal.isPowerOf2()) in visitAdd()
1091 else if (XorRHS->getValue().isPowerOf2()) in visitAdd()
1109 if (LHS->hasOneUse() && (XorRHS->getValue()+1).isPowerOf2()) { in visitAdd()
1580 if ((IntVal + 1).isPowerOf2()) { in visitSub()
DInstCombineMulDivRem.cpp125 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getLogBase2Vector()
218 if (match(C1, m_APInt(IVal)) && IVal->isPowerOf2()) in visitMul()
250 if (Val.isNegative() && PosVal.isPowerOf2()) { in visitMul()
1135 RHS->getValue().isPowerOf2()) { in visitSDiv()
DInstCombineCasts.cpp620 if ((Op1CV == 0 || Op1CV.isPowerOf2()) && in transformZExtICmp()
629 if (KnownZeroMask.isPowerOf2()) { // Exactly 1 possible 1? in transformZExtICmp()
998 ICI->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp()
1004 if (KnownZeroMask.isPowerOf2()) { in transformSExtICmp()
DInstCombineSimplifyDemanded.cpp681 if (RA.isPowerOf2()) { in SimplifyDemandedUseBits()
/external/llvm/include/llvm/ADT/
DAPInt.h369 return isNegative() && isPowerOf2(); in isMinSignedValue()
387 bool isPowerOf2() const { in isPowerOf2() function
1561 if (!isPowerOf2()) in exactLogBase2()
/external/llvm/lib/Transforms/Scalar/
DStraightLineStrengthReduce.cpp592 if (IndexOffset.isPowerOf2()) { in emitBump()
597 if ((-IndexOffset).isPowerOf2()) { in emitBump()
DSeparateConstOffsetFromGEP.cpp801 if (ElementSize.isPowerOf2()) { in lowerToSingleIndexGEPs()
862 if (ElementSize.isPowerOf2()) { in lowerToArithmetics()
/external/llvm/lib/Target/AArch64/
DAArch64FastISel.cpp499 if (C->getValue().isPowerOf2()) in isMulPowOf2()
502 if (C->getValue().isPowerOf2()) in isMulPowOf2()
729 if (C->getValue().isPowerOf2()) in computeAddress()
1187 if (C->getValue().isPowerOf2()) in emitAddSub()
1565 if (C->getValue().isPowerOf2()) in emitLogicalOp()
2191 if (C->getValue().isPowerOf2()) in emitCompareAndBranch()
2195 if (C->getValue().isPowerOf2()) { in emitCompareAndBranch()
4484 if (C->getValue().isPowerOf2()) in selectMul()
4489 if (C->getValue().isPowerOf2()) { in selectMul()
4724 !(C.isPowerOf2() || (-C).isPowerOf2())) in selectSDiv()
/external/clang/lib/Sema/
DSemaAttr.cpp205 !(Val == 0 || Val.isPowerOf2()) || in ActOnPragmaPack()
/external/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp410 if (AndRHS->getUniqueInteger().isPowerOf2()) in calcZeroHeuristics()
DValueTracking.cpp1277 if (RA.isPowerOf2()) { in computeKnownBitsFromOperator()
1315 if (RA.isPowerOf2()) { in computeKnownBitsFromOperator()
1727 return CI->getValue().isPowerOf2(); in isKnownToBeAPowerOfTwo()
1792 if ((~(LHSZeroBits & RHSZeroBits)).isPowerOf2()) in isKnownToBeAPowerOfTwo()
3189 assert(Alignment.isPowerOf2() && "must be a power of 2!"); in isAligned()
DScalarEvolutionExpander.cpp792 if (RHS.isPowerOf2()) in visitUDivExpr()
1890 if (SC->getAPInt().isPowerOf2()) { in isHighCostExpansionHelper()
/external/llvm/lib/CodeGen/SelectionDAG/
DTargetLowering.cpp1352 if ((C->getAPIntValue()+1).isPowerOf2()) { in SimplifySetCC()
1720 if (AndRHS->getAPIntValue().isPowerOf2()) { in SimplifySetCC()
1729 if (C1.isPowerOf2()) { in SimplifySetCC()
1747 if ((-AndRHSC).isPowerOf2() && (AndRHSC & C1) == C1) { in SimplifySetCC()

12