On Thu Aug 3 09:30:54 2023 +0000, Giovanni Mascellani wrote:
It's worse than that; we'd have to perform a branch *per component*.
Right. Though on second thought you can use `OpSelect` as you did, provided that you first mask away the invalid inputs with another `OpSelect`.
`OpConvertFToU` doesn't require the result to have the same width as the input, so another option is `NClamp` to `(0.0f, 4294967296.0f)`, convert to uint64, clamp to 0xffffffff, then truncate. `NClamp` does `max` first, which takes care of `NaN`.