[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 13:01:05 PDT 2024
================
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0)
}
#endif
-// CHECK: define noundef i32 @
-// CHECK: call i32 @llvm.bitreverse.i32(
-int test_bitreverse_int(int p0)
-{
- return reversebits(p0);
-}
----------------
bogner wrote:
In that case we might need to document this as a difference from dxc's behaviour, which doesn't seem to care whether it's given a signed or unsigned int: https://hlsl.godbolt.org/z/xqjvzas1K
TBH I'm a bit worried this will come up a fair amount on existing shaders.
https://github.com/llvm/llvm-project/pull/86720
More information about the cfe-commits
mailing list