[libcxx-commits] [libcxx] [libcxx] Use generic builtins for popcount, clz and ctz (PR #86563)
Nick Desaulniers via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 25 12:34:50 PDT 2024
nickdesaulniers wrote:
Right, so these builtins are nascent. Only unreleased versions of clang and gcc support them (top of tree). So you'll need to use `__has_builtin` to detect support for them. `__has_builtin` also might not exist in older compiler versions, so you may need to check that. Try to find what compiler versions libcxx currently supports; your solution will need to consider those older compilers which may lack the builtins.
https://github.com/llvm/llvm-project/pull/86563
More information about the libcxx-commits
mailing list