Open
Description
https://godbolt.org/z/1ahzc64a8
DXC returns 31 - firstbit(S)hi
instead of directly returning firstbit(S)hi
like clang currently does. This test confirms it is intentional https://github.com/microsoft/DirectXShaderCompiler/blob/b390fb19adc5d7c23180eb470470411fce986910/tools/clang/test/HLSLFileCheck/hlsl/intrinsics/bitwise/firstbitHi.hlsl#L10
Without the inversion the result has the bit set from the wrong direction.
This is a bug in the clang lowering that was caught by llvm/offload-test-suite#210
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status