[llvm-dev] Safe fptoui/fptosi casts

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 5 14:54:12 PST 2018


On Mon, 5 Nov 2018 at 14:41, Thomas Lively via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I would be interested in learning what the set of used semantics for float-to-int conversion is. If the only two used are 1) undefined behavior if unrepresentable and 2) saturate to int_{min,max} with NaN going to zero, then I think it makes sense to expose both of those natively in the IR.

Javascript has some truly bizarre modulo behaviour, though it's so far
from what anyone would actively choose I'm not sure it should affect
our decision for a canonical defined conversion.

Cheers.

Tim.


More information about the llvm-dev mailing list