[clang] [Clang] Support generic bit counting builtins on fixed boolean vectors (PR #154203)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 21 14:01:10 PDT 2025
================
@@ -4213,7 +4213,7 @@ such as ``unsigned __int128`` and C23 ``unsigned _BitInt(N)``.
``__builtin_clzg`` (respectively ``__builtin_ctzg``) returns the number of
leading (respectively trailing) 0 bits in the first argument. The first argument
-can be of any unsigned integer type.
+can be of any unsigned integer type or fixed boolean vector.
----------------
rjmccall wrote:
This conversation, where I'm requesting that you document which end of the vector is leading/trailing, does not seem resolved. I understand that you find it intuitive that the low indices of the vector are trailing because they map to the least significant bits of the bitmask that you would get with a std::bitcast, but I think that's actually not something that users are going to know. Would you like me to draft the documentation for you?
https://github.com/llvm/llvm-project/pull/154203
More information about the cfe-commits
mailing list