================ @@ -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:
Okay, you're saying that the vector is essentially a bitmask where element `i` is accessed with a mask of `1 << i`? That seems logical, but it definitely needs to be documented. "leading" and "trailing" normally refer to how we write Indo-Arabic numbers, which is actually the reverse of how people generally write vectors down. So `clz` is actually counting the number of zero values at the *end* of the vector. https://github.com/llvm/llvm-project/pull/154203 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits