[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 15:19:20 PDT 2024
bogner wrote:
> > Despite all of this, DXC does indeed support 16- and 64-bit overloads, as seen here: https://hlsl.godbolt.org/z/qbc17xz35
> > Note that the return type of the operation is not overloaded - all of the overloads of this function return uint.
>
> Why is the return type not overloaded? Isn't it overloaded for countbits which is a similar function.
The return type for countbits is also not overloaded: https://hlsl.godbolt.org/z/oGYhsjEGc - in fact none of the operations that use the `unaryBits` operation class are overloaded on the return type.
The code we're generating with clang for countbits right now actually just looks like it's wrong. It doesn't match what DXC does at all: https://hlsl.godbolt.org/z/K8n3j5o3K
https://github.com/llvm/llvm-project/pull/111082
More information about the cfe-commits
mailing list