Home
last modified time | relevance | path

Searched refs:IsPowerOfTwo (Results 1 – 22 of 22) sorted by relevance

/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_allocator_checks.h46 return alignment != 0 && IsPowerOfTwo(alignment) && in CheckAlignedAllocAlignmentAndSize()
56 return alignment != 0 && IsPowerOfTwo(alignment) && in CheckPosixMemalignAlignment()
H A Dsanitizer_common.h457 inline constexpr bool IsPowerOfTwo(uptr x) { return (x & (x - 1)) == 0; } in IsPowerOfTwo() function
461 if (IsPowerOfTwo(size)) return size; in RoundUpToPowerOfTwo()
470 RAW_CHECK(IsPowerOfTwo(boundary)); in RoundUpTo()
483 CHECK(IsPowerOfTwo(x)); in Log2()
H A Dsanitizer_posix.cpp85 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
86 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
H A Dsanitizer_flat_map.h61 static_assert(IsPowerOfTwo(kSize2), "Use a power of two for performance.");
H A Dsanitizer_ring_buffer.h100 CHECK(IsPowerOfTwo(size)); in Init()
H A Dsanitizer_allocator.cpp169 CHECK(IsPowerOfTwo(alignment)); in SetLowLevelAllocateMinAlignment()
H A Dsanitizer_common_libcdep.cpp150 CHECK(IsPowerOfTwo(align)); in InitAligned()
H A Dsanitizer_fuchsia.cpp354 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
355 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
H A Dsanitizer_allocator_secondary.h86 CHECK(IsPowerOfTwo(alignment)); in Allocate()
H A Dsanitizer_win.cpp199 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
200 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/
H A Dasan_flags.cpp170 CHECK(IsPowerOfTwo(f->redzone)); in ProcessFlags()
171 CHECK(IsPowerOfTwo(f->max_redzone)); in ProcessFlags()
H A Dasan_allocator.cpp49 CHECK(IsPowerOfTwo(rz_size)); in RZSize2Log()
377 CHECK(IsPowerOfTwo(options.min_redzone)); in CheckOptions()
378 CHECK(IsPowerOfTwo(options.max_redzone)); in CheckOptions()
559 CHECK(IsPowerOfTwo(alignment)); in Allocate()
1073 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in asan_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_allocator.cpp430 CHECK(IsPowerOfTwo(alignment)); in Allocate()
714 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in memprof_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_allocator.cpp275 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in dfsan_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/nsan/
H A Dnsan_allocator.cpp278 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in nsan_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/
H A Dlsan_allocator.cpp206 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in lsan_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/
H A Dmsan_allocator.cpp391 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in msan_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_mman.cpp312 if (UNLIKELY(!IsPowerOfTwo(align))) { in user_memalign()
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_allocator.cpp508 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in hwasan_memalign()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DDAGCombiner.cpp5105 auto IsPowerOfTwo = [](ConstantSDNode *C) { in isDivisorPowerOfTwo() local
5115 return ISD::matchUnaryPredicate(Divisor, IsPowerOfTwo); in isDivisorPowerOfTwo()
29073 auto IsPowerOfTwo = [&Pow2Constants](ConstantSDNode *C) { in takeInexpensiveLog2() local
29084 if (ISD::matchUnaryPredicate(Op, IsPowerOfTwo)) { in takeInexpensiveLog2()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DSLPVectorizer.cpp10932 const bool IsPowerOfTwo = all_of(Ops, [](Value *V) { in getOperandInfo() local
10954 VP = IsPowerOfTwo ? TTI::OP_PowerOf2 : VP; in getOperandInfo()
/freebsd/contrib/sqlite3/
H A Dsqlite3.c15675 #define IsPowerOfTwo(X) (((X)&((X)-1))==0) macro
163394 assert( IsPowerOfTwo(chngToIN) );
165913 assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );