Home
last modified time | relevance | path

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

/llvm-project-15.0.7/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.h434 inline constexpr bool IsPowerOfTwo(uptr x) { return (x & (x - 1)) == 0; } in IsPowerOfTwo() function
438 if (IsPowerOfTwo(size)) return size; in RoundUpToPowerOfTwo()
447 RAW_CHECK(IsPowerOfTwo(boundary)); in RoundUpTo()
460 CHECK(IsPowerOfTwo(x)); in Log2()
H A Dsanitizer_posix.cpp87 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
88 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
H A Dsanitizer_common_libcdep.cpp146 CHECK(IsPowerOfTwo(align)); in InitAligned()
H A Dsanitizer_ring_buffer.h98 CHECK(IsPowerOfTwo(size)); in Init()
H A Dsanitizer_allocator.cpp164 CHECK(IsPowerOfTwo(alignment)); in SetLowLevelAllocateMinAlignment()
H A Dsanitizer_flat_map.h68 static_assert(IsPowerOfTwo(kSize2), "Use a power of two for performance.");
H A Dsanitizer_fuchsia.cpp291 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
292 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
H A Dsanitizer_allocator_secondary.h86 CHECK(IsPowerOfTwo(alignment)); in Allocate()
H A Dsanitizer_win.cpp185 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
186 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
/llvm-project-15.0.7/compiler-rt/lib/asan/
H A Dasan_flags.cpp156 CHECK(IsPowerOfTwo(f->redzone)); in InitializeFlags()
157 CHECK(IsPowerOfTwo(f->max_redzone)); in InitializeFlags()
H A Dasan_allocator.cpp46 CHECK(IsPowerOfTwo(rz_size)); in RZSize2Log()
322 CHECK(IsPowerOfTwo(options.min_redzone)); in CheckOptions()
323 CHECK(IsPowerOfTwo(options.max_redzone)); in CheckOptions()
498 CHECK(IsPowerOfTwo(alignment)); in Allocate()
1006 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in asan_memalign()
/llvm-project-15.0.7/libc/test/src/string/memory_utils/
H A Dutils_test.cpp27 TEST(LlvmLibcUtilsTest, IsPowerOfTwo) { in TEST() argument
/llvm-project-15.0.7/compiler-rt/lib/memprof/
H A Dmemprof_allocator.cpp362 CHECK(IsPowerOfTwo(alignment)); in Allocate()
649 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in memprof_memalign()
/llvm-project-15.0.7/compiler-rt/lib/dfsan/
H A Ddfsan_allocator.cpp243 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in dfsan_memalign()
/llvm-project-15.0.7/compiler-rt/lib/lsan/
H A Dlsan_allocator.cpp183 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in lsan_memalign()
/llvm-project-15.0.7/compiler-rt/lib/msan/
H A Dmsan_allocator.cpp329 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in msan_memalign()
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_mman.cpp276 if (UNLIKELY(!IsPowerOfTwo(align))) { in user_memalign()
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_mman.cpp298 if (UNLIKELY(!IsPowerOfTwo(align))) { in user_memalign()
/llvm-project-15.0.7/compiler-rt/lib/hwasan/
H A Dhwasan_allocator.cpp423 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in hwasan_memalign()
/llvm-project-15.0.7/compiler-rt/lib/scudo/
H A Dscudo_allocator.cpp703 if (Alignment && UNLIKELY(!IsPowerOfTwo(Alignment))) { in scudoAllocate()
/llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/
H A DDAGCombiner.cpp4368 auto IsPowerOfTwo = [](ConstantSDNode *C) { in isDivisorPowerOfTwo() local
4378 return ISD::matchUnaryPredicate(Divisor, IsPowerOfTwo); in isDivisorPowerOfTwo()