[Openmp-commits] [PATCH] D149490: [OpenMP] In libomptarget, assume alignment at powers of two
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 1 13:32:35 PDT 2023
jhuber6 added inline comments.
================
Comment at: openmp/libomptarget/src/omptarget.cpp:112
+ auto BaseAlignment = MaxAlignment;
+ while (reinterpret_cast<uintptr_t>(HstPtrBase) % BaseAlignment)
+ BaseAlignment /= 2;
----------------
Shouldn't this just be looking for the first non zero bit? Like `__builtin_ffsl` or similar?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149490/new/
https://reviews.llvm.org/D149490
More information about the Openmp-commits
mailing list