On Fri Nov 3 14:34:08 2023 +0000, Conor McCarthy wrote:
It doesn't confuse signed and unsigned exactly. It always uses unsigned but performs signed ops where necessary. This avoids signed/unsigned bitcasting. Fortunately `SPIR-V` is flexible and allows signed ops on unsigned values. Making VSIR require strict signedness would greatly complicate matters.
Ok, I think it's ok to agree that at VSIR level `ftoi` can have an unsigned destination (so that things can be left simpler in the DXIL frontend), but in that case the comment shouldn't mention DXIL, but the VSIR rules. Something like: "VSIR allows the destination of a signed conversion to be unsigned".