New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃洡 Non-trapping float-to-int conversions #1143

Closed
jfbastien opened this Issue Nov 3, 2017 · 1 comment

Comments

Projects
None yet
4 participants
@jfbastien
Member

jfbastien commented Nov 3, 2017

This is a tracking issue for a post-MVP feature
It will be updated as the issue progresses.

Topic Non-trapping float-to-int conversions
Champion Dan Gohman @sunfishcode
Status in progress
Phase Implementation phase
Linked issues #986, #1089
Linked repositories github.com/WebAssembly/nontrapping-float-to-int-conversions

Details

The primary motivations are:

  • LLVM鈥檚 float-to-int conversion has an undefined result, rather than undefined behavior, and it seems LLVM does speculate it under certain conditions.
  • For the SIMD proposal, it鈥檚 more SIMD-hardware-like if no SIMD operations trap. This proposal would establish a convention for saturating operations which SIMD could share, to avoid introducing trapping.

This proposal is not motivated by performance data.

It's plausible that LLVM could be changed, to have something like an "nsw" flag for the "fptosi" instruction, especially with some of the recent proposals to modify the poison concept in LLVM. However, no one is currently working on this.

@binji

This comment has been minimized.

Member

binji commented Oct 16, 2018

@binji binji closed this Oct 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.