| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | CmpInstAnalysis.cpp | 118 if (!C->isPowerOf2()) in decomposeBitTestICmp() 125 if (!(*C + 1).isPowerOf2()) in decomposeBitTestICmp() 132 if (!(*C + 1).isPowerOf2()) in decomposeBitTestICmp() 139 if (!C->isPowerOf2()) in decomposeBitTestICmp()
|
| H A D | TargetTransformInfo.cpp | 718 if (CI->getValue().isPowerOf2()) in getOperandInfo() 739 if (CI->getValue().isPowerOf2()) in getOperandInfo() 745 if (CI->getValue().isPowerOf2()) in getOperandInfo()
|
| /llvm-project-15.0.7/clang/include/clang/Basic/ |
| H A D | Sanitizers.h | 70 bool isPowerOf2() const { in isPowerOf2() function 156 assert(K.isPowerOf2() && "Has to be a single sanitizer."); in has() 165 assert(K.isPowerOf2() && "Has to be a single sanitizer."); in set()
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/GISel/ |
| H A D | AArch64PostLegalizerCombiner.cpp | 185 if (SCVMinus1.isPowerOf2()) { in matchAArch64MulConstCombine() 188 } else if (CVPlus1.isPowerOf2()) { in matchAArch64MulConstCombine() 198 if (CVNegPlus1.isPowerOf2()) { in matchAArch64MulConstCombine() 202 } else if (CVNegMinus1.isPowerOf2()) { in matchAArch64MulConstCombine()
|
| /llvm-project-15.0.7/mlir/include/mlir/ExecutionEngine/ |
| H A D | CRunnerUtils.h | 46 constexpr bool isPowerOf2(int n) { return (!(n & (n - 1))); } in isPowerOf2() function 49 return (n <= 1) ? 1 : (isPowerOf2(n) ? n : (2 * nextPowerOf2((n + 1) / 2))); in nextPowerOf2() 104 mlir::detail::isPowerOf2(sizeof(T[Dim]))> {
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | SwiftCallingConv.cpp | 27 static bool isPowerOf2(unsigned n) { in isPowerOf2() function 423 assert(isPowerOf2(unitSize.getQuantity())); in getOffsetAtStartOfUnit() 665 if (!isPowerOf2(size)) { in getNaturalAlignment() 713 if (numElts >= 4 && isPowerOf2(numElts)) { in splitLegalVectorType() 777 if (numElts > 2 && !isPowerOf2(numElts) && in legalizeVectorType()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | SuspiciousEnumUsageCheck.cpp | 66 if (Val.isPowerOf2() || !Val.getBoolValue()) in isNonPowerOf2NorNullLiteral()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | MagicNumbersCheck.cpp | 178 if (IgnorePowersOf2IntegerValues && IntValue.isPowerOf2()) in isIgnoredValue()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCompares.cpp | 1254 if (!CI2->getValue().isPowerOf2()) in processUGT_ADDCST_ADD() 1647 if (*XorC == C && (C + 1).isPowerOf2()) in foldICmpXorConstant() 1652 if (*XorC == -C && C.isPowerOf2()) in foldICmpXorConstant() 1656 if (*XorC == C && (-C).isPowerOf2()) in foldICmpXorConstant() 2066 bool CIsPowerOf2 = C.isPowerOf2(); in foldICmpShlOne() 2221 if ((C + 1).isPowerOf2() && in foldICmpShlConstant() 2229 if (C.isPowerOf2() && in foldICmpShlConstant() 3222 if (C == *BOC && C.isPowerOf2()) in foldICmpBinOpEqualityWithConstant() 3788 assert(ICmpCst.isPowerOf2()); in foldICmpWithTruncSignExtendedVal() 5174 if (CVal.isPowerOf2()) { in processUMulZExtIdiom() [all …]
|
| H A D | InstCombineAndOrXor.cpp | 163 bool IsAPow2 = ConstA && ConstA->isPowerOf2(); in getMaskedICmpType() 164 bool IsBPow2 = ConstB && ConstB->isPowerOf2(); in getMaskedICmpType() 427 (*BCst & (*BCst ^ *DCst)).isPowerOf2()) { in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed() 819 assert(HighestBit.isPowerOf2() && "expected to be power of two (non-zero)"); in foldSignedTruncationCheck() 871 if (!OtherHighestBit.isPowerOf2()) in foldSignedTruncationCheck() 1188 if (!LowerDiff.isPowerOf2() || LowerDiff != UpperDiff || in foldAndOrOfICmpsUsingRanges() 1841 if (Op0->hasOneUse() && C->isPowerOf2() && (*AddC & (*C - 1)) == 0) { in visitAnd() 1932 if (C->isPowerOf2() && in visitAnd() 1948 if (C3->isPowerOf2()) { in visitAnd()
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | KnownBits.cpp | 554 if (RHS.isConstant() && RHS.getConstant().isPowerOf2()) { in urem() 575 if (RHS.isConstant() && RHS.getConstant().isPowerOf2()) { in srem()
|
| /llvm-project-15.0.7/llvm/unittests/ADT/ |
| H A D | APIntTest.cpp | 1794 TEST(APIntTest, isPowerOf2) { in TEST() argument 1795 EXPECT_FALSE(APInt(5, 0x00).isPowerOf2()); in TEST() 1796 EXPECT_FALSE(APInt(32, 0x11).isPowerOf2()); in TEST() 1797 EXPECT_TRUE(APInt(17, 0x01).isPowerOf2()); in TEST() 1798 EXPECT_TRUE(APInt(32, (unsigned)(0xffu << 31)).isPowerOf2()); in TEST() 1801 EXPECT_FALSE(APInt(N, 0).isPowerOf2()); in TEST() 1802 EXPECT_TRUE(APInt::getSignedMinValue(N).isPowerOf2()); in TEST() 1806 EXPECT_TRUE(APInt::getOneBitSet(N, I).isPowerOf2()); in TEST() 1809 EXPECT_TRUE(MaskVal.isPowerOf2()); in TEST()
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | canonicalize-constant-low-bit-mask-and-icmp-uge-to-icmp-ule.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-ult-to-icmp-ugt.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-eq-to-icmp-ule.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-ugt-to-icmp-ugt.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-sge-to-icmp-sle.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-ule-to-icmp-ule.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| H A D | canonicalize-constant-low-bit-mask-and-icmp-slt-to-icmp-sgt.ll | 10 ; Iff: isPowerOf2(C + 1)
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | SeparateConstOffsetFromGEP.cpp | 878 if (ElementSize.isPowerOf2()) { in lowerToSingleIndexGEPs() 939 if (ElementSize.isPowerOf2()) { in lowerToArithmetics()
|
| /llvm-project-15.0.7/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() 4583 if (C->getValue().isPowerOf2()) in selectMul() 4588 if (C->getValue().isPowerOf2()) { in selectMul() 4816 !(C.isPowerOf2() || C.isNegatedPowerOf2())) in selectSDiv()
|
| /llvm-project-15.0.7/polly/unittests/Isl/ |
| H A D | IslTest.cpp | 245 EXPECT_TRUE(APLargePow2.isPowerOf2()); in TEST() 263 EXPECT_TRUE(APLargePow2.isPowerOf2()); in TEST()
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 425 bool isPowerOf2() const { in isPowerOf2() function 1675 if (!isPowerOf2()) in exactLogBase2()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/AggressiveInstCombine/ |
| H A D | AggressiveInstCombine.cpp | 391 if (!(*MinC + 1).isPowerOf2() || -*MaxC != *MinC + 1) in tryToFPToSat()
|