| /freebsd-13.1/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | CmpInstAnalysis.cpp | 108 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 D | TargetTransformInfo.cpp | 661 if (CI->getValue().isPowerOf2()) in getOperandInfo() 682 if (CI->getValue().isPowerOf2()) in getOperandInfo() 688 if (CI->getValue().isPowerOf2()) in getOperandInfo()
|
| H A D | Loads.cpp | 38 assert(APAlign.isPowerOf2() && "must be a power of 2!"); in isAligned()
|
| H A D | BranchProbabilityInfo.cpp | 942 if (AndRHS->getValue().isPowerOf2()) in calcZeroHeuristics()
|
| /freebsd-13.1/contrib/llvm-project/clang/include/clang/Basic/ |
| H A D | Sanitizers.h | 69 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 D | AArch64PostLegalizerCombiner.cpp | 183 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 D | SwiftCallingConv.cpp | 26 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 D | InstCombineCompares.cpp | 1256 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 D | InstCombineAndOrXor.cpp | 192 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 D | InstCombineCasts.cpp | 1007 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 D | InstCombineAddSub.cpp | 953 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 D | InstCombineSelect.cpp | 154 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 D | InstCombineSimplifyDemanded.cpp | 706 if (RA.isPowerOf2()) { in SimplifyDemandedUseBits()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Support/ |
| H A D | KnownBits.cpp | 536 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 D | StraightLineStrengthReduce.cpp | 618 if (IndexOffset.isPowerOf2()) { in emitBump() 623 if ((-IndexOffset).isPowerOf2()) { in emitBump()
|
| H A D | SeparateConstOffsetFromGEP.cpp | 879 if (ElementSize.isPowerOf2()) { in lowerToSingleIndexGEPs() 940 if (ElementSize.isPowerOf2()) { in lowerToArithmetics()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64FastISel.cpp | 554 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 D | Utils.cpp | 703 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 D | SystemZTargetTransformInfo.cpp | 427 (CVal->getValue().isPowerOf2() || (-CVal->getValue()).isPowerOf2())) in getArithmeticInstrCost()
|
| /freebsd-13.1/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 469 bool isPowerOf2() const { 1852 if (!isPowerOf2())
|
| /freebsd-13.1/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | PatternMatch.h | 540 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 D | Verifier.cpp | 4693 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 D | SemaAttr.cpp | 344 !(*Val == 0 || Val->isPowerOf2()) || Val->getZExtValue() > 16) { in ActOnPragmaPack()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonISelDAGToDAG.cpp | 2192 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 D | ScalarEvolutionExpander.cpp | 915 if (RHS.isPowerOf2()) in visitUDivExpr() 2305 if (SC->getAPInt().isPowerOf2()) in costAndCollectOperands()
|