Home
last modified time | relevance | path

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

123

/freebsd-13.1/contrib/llvm-project/llvm/lib/Analysis/
H A 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()
H A DTargetTransformInfo.cpp661 if (CI->getValue().isPowerOf2()) in getOperandInfo()
682 if (CI->getValue().isPowerOf2()) in getOperandInfo()
688 if (CI->getValue().isPowerOf2()) in getOperandInfo()
H A DLoads.cpp38 assert(APAlign.isPowerOf2() && "must be a power of 2!"); in isAligned()
H A DBranchProbabilityInfo.cpp942 if (AndRHS->getValue().isPowerOf2()) in calcZeroHeuristics()
/freebsd-13.1/contrib/llvm-project/clang/include/clang/Basic/
H A DSanitizers.h69 bool isPowerOf2() const { in isPowerOf2() function
149 assert(K.isPowerOf2() && "Has to be a single sanitizer."); in has()
158 assert(K.isPowerOf2() && "Has to be a single sanitizer."); in set()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/
H A DAArch64PostLegalizerCombiner.cpp183 if (SCVMinus1.isPowerOf2()) { in matchAArch64MulConstCombine()
186 } else if (CVPlus1.isPowerOf2()) { in matchAArch64MulConstCombine()
196 if (CVNegPlus1.isPowerOf2()) { in matchAArch64MulConstCombine()
200 } else if (CVNegMinus1.isPowerOf2()) { in matchAArch64MulConstCombine()
/freebsd-13.1/contrib/llvm-project/clang/lib/CodeGen/
H A DSwiftCallingConv.cpp26 static bool isPowerOf2(unsigned n) { in isPowerOf2() function
422 assert(isPowerOf2(unitSize.getQuantity())); in getOffsetAtStartOfUnit()
664 if (!isPowerOf2(size)) { in getNaturalAlignment()
712 if (numElts >= 4 && isPowerOf2(numElts)) { in splitLegalVectorType()
776 if (numElts > 2 && !isPowerOf2(numElts) && in legalizeVectorType()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineCompares.cpp1256 if (!CI2->getValue().isPowerOf2()) in processUGT_ADDCST_ADD()
1646 if (*XorC == -C && C.isPowerOf2()) in foldICmpXorConstant()
1650 if (*XorC == C && (-C).isPowerOf2()) in foldICmpXorConstant()
1776 if ((~(*C2) + 1).isPowerOf2()) { in foldICmpAndConstConst()
2029 bool CIsPowerOf2 = C.isPowerOf2(); in foldICmpShlOne()
2184 if ((C + 1).isPowerOf2() && in foldICmpShlConstant()
2192 if (C.isPowerOf2() && in foldICmpShlConstant()
3128 if (C == *BOC && C.isPowerOf2()) in foldICmpBinOpEqualityWithConstant()
3565 assert(ICmpCst.isPowerOf2()); in foldICmpWithTruncSignExtendedVal()
4806 if (CVal.isPowerOf2()) { in processUMulZExtIdiom()
[all …]
H A DInstCombineAndOrXor.cpp192 bool IsAPow2 = (ACst && !ACst->isZero() && ACst->getValue().isPowerOf2()); in getMaskedICmpType()
193 bool IsBPow2 = (BCst && !BCst->isZero() && BCst->getValue().isPowerOf2()); in getMaskedICmpType()
454 (BCst->getValue() & (BCst->getValue() ^ DCst->getValue())).isPowerOf2()) { in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
769 if (Xor.isPowerOf2()) { in foldAndOrOfEqualityCmpsWithConstants()
898 assert(HighestBit.isPowerOf2() && "expected to be power of two (non-zero)"); in foldSignedTruncationCheck()
950 if (!OtherHighestBit.isPowerOf2()) in foldSignedTruncationCheck()
1280 if ((PredL == ICmpInst::ICMP_ULT && LHSC->getValue().isPowerOf2()) || in foldAndOfICmps()
1893 if (Op0->hasOneUse() && C->isPowerOf2() && (*AddC & (*C - 1)) == 0) { in visitAnd()
2403 if (DiffC.isPowerOf2()) { in foldOrOfICmps()
2419 if (LowRangeDiff.isPowerOf2() && LowRangeDiff == HighRangeDiff && in foldOrOfICmps()
H A DInstCombineCasts.cpp1007 if ((Op1CV->isNullValue() || Op1CV->isPowerOf2()) && in transformZExtICmp()
1014 if (KnownZeroMask.isPowerOf2()) { // Exactly 1 possible 1? in transformZExtICmp()
1397 ICI->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp()
1401 if (KnownZeroMask.isPowerOf2()) { in transformSExtICmp()
H A DInstCombineAddSub.cpp953 if (C->isPowerOf2()) in foldAddWithConstant()
955 else if (C2->isPowerOf2()) in foldAddWithConstant()
1031 if (match(E, m_And(m_Value(Op), m_APInt(AI))) && (*AI + 1).isPowerOf2()) { in MatchRem()
H A DInstCombineSelect.cpp154 if (!AndMask.isPowerOf2()) in foldSelectICmpAnd()
200 if (!TC.isPowerOf2() && !FC.isPowerOf2()) in foldSelectICmpAnd()
2206 if (!(*MaxValue + 1).isPowerOf2() || -*MinValue != *MaxValue + 1) in matchSAddSubSat()
H A DInstCombineSimplifyDemanded.cpp706 if (RA.isPowerOf2()) { in SimplifyDemandedUseBits()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Support/
H A DKnownBits.cpp536 if (RHS.isConstant() && RHS.getConstant().isPowerOf2()) { in urem()
557 if (RHS.isConstant() && RHS.getConstant().isPowerOf2()) { in srem()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DStraightLineStrengthReduce.cpp618 if (IndexOffset.isPowerOf2()) { in emitBump()
623 if ((-IndexOffset).isPowerOf2()) { in emitBump()
H A DSeparateConstOffsetFromGEP.cpp879 if (ElementSize.isPowerOf2()) { in lowerToSingleIndexGEPs()
940 if (ElementSize.isPowerOf2()) { in lowerToArithmetics()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64FastISel.cpp554 if (C->getValue().isPowerOf2()) in isMulPowOf2()
557 if (C->getValue().isPowerOf2()) in isMulPowOf2()
781 if (C->getValue().isPowerOf2()) in computeAddress()
1230 if (C->getValue().isPowerOf2()) in emitAddSub()
1599 if (C->getValue().isPowerOf2()) in emitLogicalOp()
2291 if (C->getValue().isPowerOf2()) in emitCompareAndBranch()
2295 if (C->getValue().isPowerOf2()) { in emitCompareAndBranch()
4576 if (C->getValue().isPowerOf2()) in selectMul()
4581 if (C->getValue().isPowerOf2()) { in selectMul()
4809 !(C.isPowerOf2() || (-C).isPowerOf2())) in selectSDiv()
/freebsd-13.1/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DUtils.cpp703 return CI->getValue().zextOrTrunc(BitWidth).isPowerOf2(); in isKnownToBeAPowerOfTwo()
741 if (!Const || !Const->zextOrTrunc(BitWidth).isPowerOf2()) in isKnownToBeAPowerOfTwo()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZTargetTransformInfo.cpp427 (CVal->getValue().isPowerOf2() || (-CVal->getValue()).isPowerOf2())) in getArithmeticInstrCost()
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPInt.h469 bool isPowerOf2() const {
1852 if (!isPowerOf2())
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/IR/
H A DPatternMatch.h540 bool isValue(const APInt &C) { return C.isPowerOf2(); } in isValue()
552 bool isValue(const APInt &C) { return (-C).isPowerOf2(); } in isValue()
564 bool isValue(const APInt &C) { return !C || C.isPowerOf2(); } in isValue()
/freebsd-13.1/contrib/llvm-project/llvm/lib/IR/
H A DVerifier.cpp4693 Assert(ElementSizeVal.isPowerOf2(), in visitIntrinsicCall()
4985 Assert(Alignment->getValue().isPowerOf2(), in visitIntrinsicCall()
5005 Assert(Alignment->getValue().isPowerOf2(), in visitIntrinsicCall()
5020 Assert(Alignment.isNullValue() || Alignment.isPowerOf2(), in visitIntrinsicCall()
5027 Assert(Alignment.isNullValue() || Alignment.isPowerOf2(), in visitIntrinsicCall()
/freebsd-13.1/contrib/llvm-project/clang/lib/Sema/
H A DSemaAttr.cpp344 !(*Val == 0 || Val->isPowerOf2()) || Val->getZExtValue() > 16) { in ActOnPragmaPack()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonISelDAGToDAG.cpp2192 if (V1C && NOpcode == ISD::MUL && V1C->getAPIntValue().isPowerOf2()) in balanceSubTree()
2220 if (V1C && V1C->getAPIntValue().isPowerOf2()) { in balanceSubTree()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp915 if (RHS.isPowerOf2()) in visitUDivExpr()
2305 if (SC->getAPInt().isPowerOf2()) in costAndCollectOperands()

123