On Mon Feb 26 14:15:46 2024 +0000, Giovanni Mascellani wrote:
I'm not sure this is the right solution. The instruction generated by the DXIL frontend is this:
mov sr1.xy <v4:uint>, d(1.3300000000000001e+01l) <s:double>
This instruction seems to have all the information it needs to be correctly interpreted, without having to force the source register to be IMMCONST while it clearly contains a 64 bit constant. I rather think that the MOV handler should take into account the type width mismatch and do the repacking at that level.
We could do that. The MOV handler calls `spirv_compiler_emit_load_src()` and doesn't look into the details of src loading, so it's a bit untidy to partially handle that outside the helper, but the only other alternative is add a parameter to the function, which is also messy because of how many other functions call it.