SPIRV-Tools/source/util
Steven Perron 581279dedd
[OPT] Zero-extend unsigned 16-bit integers when bitcasting (#5714)
The folding rule `BitCastScalarOrVector` was incorrectly handling
bitcasting to unsigned integers smaller than 32-bits. It was simply
copying the entire 32-bit word containing the integer. This conflicts with the
requirement in section 2.2.1 of the SPIR-V spec which states that
unsigned numeric types with a bit width less than 32-bits must have the
high-order bits set to 0.

This change include a refactor of the bit extension code to be able to
test it better, and to use it in multiple files.

Fixes https://github.com/microsoft/DirectXShaderCompiler/issues/6319.
2024-06-19 19:17:05 +02:00
..
bit_vector.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
bit_vector.h Fix various source comment (doxygen) typos (#4680) 2022-01-26 15:13:08 -05:00
bitutils.h [OPT] Zero-extend unsigned 16-bit integers when bitcasting (#5714) 2024-06-19 19:17:05 +02:00
hash_combine.h Optimize Type::HashValue (#4707) 2022-02-15 18:57:39 +00:00
hex_float.h Fix undef behaviour in hex float parsing (#5025) 2022-12-19 15:46:57 -05:00
ilist_node.h Rewrite include guards (#1793) 2018-08-03 08:05:33 -04:00
ilist.h Suppress -Wunused-but-set-variable on variable (#4777) 2022-04-01 17:07:05 +01:00
make_unique.h Use MakeUnique. (#1837) 2018-08-14 15:01:50 -04:00
parse_number.cpp Use MakeUnique. (#1837) 2018-08-14 15:01:50 -04:00
parse_number.h Fix various source comment (doxygen) typos (#4680) 2022-01-26 15:13:08 -05:00
small_vector.h Remove use of deprecated std::aligned_storage (#5183) 2023-04-06 17:22:28 +02:00
string_utils.cpp Add option for the max id bound. (#1870) 2018-09-10 11:49:41 -04:00
string_utils.h Fix endianness of string literals (#4622) 2021-12-08 12:01:26 -05:00
timer.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
timer.h Fix various source comment (doxygen) typos (#4680) 2022-01-26 15:13:08 -05:00