| /freebsd/contrib/llvm-project/clang/include/clang/Basic/ |
| H A D | Sanitizers.h | 74 bool isPowerOf2() const { in isPowerOf2() function 175 assert(K.isPowerOf2() && "Has to be a single sanitizer."); in has() 188 assert(K.isPowerOf2() && "Has to be a single sanitizer."); in set()
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | CmpInstAnalysis.cpp | 115 if (FlippedSign.isPowerOf2()) { in decomposeBitTestICmp() 135 if (C.isPowerOf2()) { in decomposeBitTestICmp()
|
| H A D | TargetTransformInfo.cpp | 896 if (CI->getValue().isPowerOf2()) in getOperandInfo() 923 if (CI->getValue().isPowerOf2()) in getOperandInfo() 934 AllPow2 &= CI->getValue().isPowerOf2(); in getOperandInfo()
|
| /freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
| H A D | SwiftCallingConv.cpp | 27 static bool isPowerOf2(unsigned n) { in isPowerOf2() function 424 assert(isPowerOf2(unitSize.getQuantity())); in getOffsetAtStartOfUnit() 707 if (numElts >= 4 && isPowerOf2(numElts)) { in splitLegalVectorType() 771 if (numElts > 2 && !isPowerOf2(numElts) && in legalizeVectorType()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/ |
| H A D | CSKYISelLowering.cpp | 1361 if ((Imm + 1).isPowerOf2() || (Imm - 1).isPowerOf2() || in decomposeMulByConstant() 1362 (1 - Imm).isPowerOf2()) in decomposeMulByConstant() 1367 if (!Subtarget.hasE2() && (-1 - Imm).isPowerOf2()) in decomposeMulByConstant() 1371 if (Imm.ugt(0xffff) && ((Imm - 2).isPowerOf2() || (Imm - 4).isPowerOf2()) && in decomposeMulByConstant() 1374 if (Imm.ugt(0xffff) && (Imm - 8).isPowerOf2() && Subtarget.has2E3()) in decomposeMulByConstant()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/ |
| H A D | AArch64PostLegalizerCombiner.cpp | 197 if (SCVMinus1.isPowerOf2()) { in matchAArch64MulConstCombine() 200 } else if (CVPlus1.isPowerOf2()) { in matchAArch64MulConstCombine() 210 if (CVNegPlus1.isPowerOf2()) { in matchAArch64MulConstCombine() 214 } else if (CVNegMinus1.isPowerOf2()) { in matchAArch64MulConstCombine()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | ExpandLargeDivRem.cpp | 49 return Val.isPowerOf2(); in isConstantPowerOfTwo()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCompares.cpp | 1033 if (AP1.isAllOnes() && !AP2.isPowerOf2()) in foldICmpShrConstConst() 1108 if (!CI2->getValue().isPowerOf2()) in processUGT_ADDCST_ADD() 1484 if (C.isPowerOf2()) in foldICmpTruncConstant() 1642 if (*XorC == ~C && (C + 1).isPowerOf2()) in foldICmpXorConstant() 1645 if (*XorC == C && (C + 1).isPowerOf2()) in foldICmpXorConstant() 1650 if (*XorC == -C && C.isPowerOf2()) in foldICmpXorConstant() 1654 if (*XorC == C && (-C).isPowerOf2()) in foldICmpXorConstant() 1675 if (!PowerOf2.isPowerOf2()) in foldICmpXorShiftConst() 2108 if (*MaskC == C && (C + 1).isPowerOf2()) { in foldICmpOrConstant() 2290 bool CIsPowerOf2 = Rem.isZero() && Div.isPowerOf2(); in foldICmpShlLHSC() [all …]
|
| H A D | InstCombineAndOrXor.cpp | 126 bool IsAPow2 = ConstA && ConstA->isPowerOf2(); in getMaskedICmpType() 127 bool IsBPow2 = ConstB && ConstB->isPowerOf2(); in getMaskedICmpType() 424 (*BCst & (*BCst ^ *DCst)).isPowerOf2()) { in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed() 871 assert(HighestBit.isPowerOf2() && "expected to be power of two (non-zero)"); in foldSignedTruncationCheck() 921 if (!OtherHighestBit.isPowerOf2()) in foldSignedTruncationCheck() 1364 if (!LowerDiff.isPowerOf2() || LowerDiff != UpperDiff || in foldAndOrOfICmpsUsingRanges() 2501 if (Op0->hasOneUse() && C->isPowerOf2() && (*AddC & (*C - 1)) == 0) { in visitAnd() 2592 if (C->isPowerOf2() && in visitAnd() 2608 if (C3->isPowerOf2()) { in visitAnd() 3652 if (!ICmpDecompose->Mask.isPowerOf2() || ICmpDecompose->Mask.isZero() || in matchBitmaskMul()
|
| H A D | InstCombineAddSub.cpp | 964 if (C->isPowerOf2()) in foldAddWithConstant() 966 else if (C2->isPowerOf2()) in foldAddWithConstant() 1112 if (match(E, m_And(m_Value(Op), m_APInt(AI))) && (*AI + 1).isPowerOf2()) { in MatchRem() 1199 !(C1.isOne() && !IsSigned && DivOpC.isPowerOf2() && DivOpC != 2)) { in SimplifyAddWithRemainder() 1643 C1->isPowerOf2() && (ComputeNumSignBits(A) > C1->countl_zero())) { in visitAdd() 2510 if ((*C3 - C2AndC3Minus1).isPowerOf2() && in visitSub()
|
| H A D | InstCombineShifts.cpp | 1520 if (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitLShr() 1559 if (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitLShr() 1794 (BitWidth > 2 && (*MulC - 1).isPowerOf2() && in visitAShr()
|
| H A D | InstCombineCasts.cpp | 1009 bool IsExpectShAmt = KnownZeroMask.isPowerOf2() && in transformZExtICmp() 1371 Cmp->isEquality() && (Op1C->isZero() || Op1C->getValue().isPowerOf2())){ in transformSExtICmp() 1375 if (KnownZeroMask.isPowerOf2()) { in transformSExtICmp()
|
| H A D | InstCombineSimplifyDemanded.cpp | 622 if (DemandedMask.isPowerOf2()) { in SimplifyDemandedUseBits() 886 if (match(I->getOperand(1), m_APInt(Rem)) && Rem->isPowerOf2()) { in SimplifyDemandedUseBits()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | AlignmentFromAssumptions.cpp | 178 if (!cast<SCEVConstant>(AlignSCEV)->getAPInt().isPowerOf2()) in extractAlignmentInfo()
|
| H A D | SeparateConstOffsetFromGEP.cpp | 920 if (ElementSize.isPowerOf2()) { in lowerToSingleIndexGEPs() 980 if (ElementSize.isPowerOf2()) { in lowerToArithmetics()
|
| H A D | StraightLineStrengthReduce.cpp | 600 if (IndexOffset.isPowerOf2()) { in emitBump()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64FastISel.cpp | 577 if (C->getValue().isPowerOf2()) in isMulPowOf2() 580 if (C->getValue().isPowerOf2()) in isMulPowOf2() 804 if (C->getValue().isPowerOf2()) in computeAddress() 1244 if (C->getValue().isPowerOf2()) in emitAddSub() 1615 if (C->getValue().isPowerOf2()) in emitLogicalOp() 2308 if (C->getValue().isPowerOf2()) in emitCompareAndBranch() 2312 if (C->getValue().isPowerOf2()) { in emitCompareAndBranch() 4668 if (C->getValue().isPowerOf2()) in selectMul() 4673 if (C->getValue().isPowerOf2()) { in selectMul() 4900 !(C.isPowerOf2() || C.isNegatedPowerOf2())) in selectSDiv()
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | KnownBits.cpp | 1051 if (RHS.isConstant() && RHS.getConstant().isPowerOf2()) { in urem() 1068 if (RHS.isConstant() && RHS.getConstant().isPowerOf2()) { in srem()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/ |
| H A D | RISCVTargetTransformInfo.cpp | 221 if (ST->hasStdExtZbs() && (~Imm).isPowerOf2()) in getIntImmCostInst() 234 if (ST->hasStdExtZbs() && Imm.isPowerOf2()) in getIntImmCostInst() 240 if (Imm.isPowerOf2() || Imm.isNegatedPowerOf2()) in getIntImmCostInst() 243 if ((Imm + 1).isPowerOf2() || (Imm - 1).isPowerOf2()) in getIntImmCostInst()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 440 bool isPowerOf2() const { in isPowerOf2() function 1784 if (!isPowerOf2()) in exactLogBase2()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/LoongArch/ |
| H A D | LoongArchISelLowering.cpp | 8310 if ((Imm + 1).isPowerOf2() || (Imm - 1).isPowerOf2() || in decomposeMulByConstant() 8311 (1 - Imm).isPowerOf2() || (-1 - Imm).isPowerOf2()) in decomposeMulByConstant() 8315 ((Imm - 2).isPowerOf2() || (Imm - 4).isPowerOf2() || in decomposeMulByConstant() 8316 (Imm - 8).isPowerOf2() || (Imm - 16).isPowerOf2())) in decomposeMulByConstant() 8335 if ((Imm - ImmSmall).isPowerOf2() || (Imm + ImmSmall).isPowerOf2() || in decomposeMulByConstant() 8336 (ImmSmall - Imm).isPowerOf2()) in decomposeMulByConstant()
|
| /freebsd/contrib/llvm-project/clang/lib/Sema/ |
| H A D | SemaStmtAttr.cpp | 372 ArgVal > CodeAlignAttr::MaximumAlignment || !ArgVal.isPowerOf2()) { in BuildCodeAlignAttr()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | ScalarEvolutionExpander.cpp | 671 if (RHS.isPowerOf2()) in visitUDivExpr() 1900 if (SC->getAPInt().isPowerOf2()) in costAndCollectOperands()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
| H A D | Utils.cpp | 1121 return CI->getValue().zextOrTrunc(BitWidth).isPowerOf2(); in isKnownToBeAPowerOfTwo() 1158 if (!Const || !Const->zextOrTrunc(BitWidth).isPowerOf2()) in isKnownToBeAPowerOfTwo()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | TargetTransformInfo.h | 1172 bool isPowerOf2() const { in isPowerOf2() function
|