On Mon Feb 26 14:50:54 2024 +0000, Conor McCarthy wrote:
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.
I might be missing something, but I don't think the `spirv_compiler_emit_load_src()` should change. Instead, I guess `spirv_compiler_emit_mov()` should first compare the type width for its source and destination and, if they do not match, it should fix the mask passed to `spirv_compiler_emit_load_src()` and than repack appropriately the result before storing it.
I agree that the support for 64 bit types in VSIR is still a bit hacky, at some point a proper interface (independent of the various backends and frontends) should be defined and maybe some edge cases fixed or rewritten.