LLVM's float-to-in conversions return undef in exceptional conditions, and may be speculated. WebAssemlby's traps, making them not safe for speculation. This patch changes LLVM codegen to emit a test so that code doesn't trap even with speculated conversions.
This patch is not yet tested. I'll add tests next time I circle back to this patch. In the mean time, it's here in case anyone wants to see it or try it out.