WaveMatch with a vector input value
The spec. of SM6.5 says:
uint4 WaveMatch(
val can be any expression which evaluates to any of the currently supported primitive data types (e.g. float4, uint2, etc.).
in https://microsoft.github.io/DirectX-Specs/d3d/HLSL_ShaderModel6_5.html
However, when I use WaveMatch(uint4), it shows a validation error: 1>Content\Shaders/ImpactRange.hlsli(59,18): error G315CBA34: Instructions must be of an allowed type. 1>note: at '%1219 = insertvalue %dx.types.fouri32 %1214, i32 %1218, 0' in block '#33' of function 'main'.
The error is only reported by the debug mode (disable optimization and enable debug info). Under release mode, it is silent. Anyway, after seeing this error, I even doubt whether dxcompiler really allows and has implemented uint4 val following the spec. description.
Repro link: https://godbolt.org/z/xjxe85z7z
The value isn't getting scalarized. Might need a custom scalarization pass for non-optimized builds
We expect that this will not be an issue in clang; setting to dormant in case someone wants to tackle fixing this in DXC.