[clang] [clang] Introduce elementwise ctlz/cttz builtins (PR #131995)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 20 08:48:32 PDT 2025


jhuber6 wrote:

> > Dropping in after the fact, is there a reason we called this `__builtin_elementwise_ctlz` instead of `__builtin_elementwise_clzg`? The builtin is just `clzg` done on each element so the name is confusing me.
> 
> It matches the llvm intrinsic name, and the second argument is a difference from clz

That is what `clzg` does, unless I'm missing something https://godbolt.org/z/x1fqTxc43.

https://github.com/llvm/llvm-project/pull/131995


More information about the cfe-commits mailing list