Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check why f32 as u128 generates so much code #1

Open
m-ou-se opened this issue Aug 12, 2020 · 0 comments
Open

Check why f32 as u128 generates so much code #1

m-ou-se opened this issue Aug 12, 2020 · 0 comments
Labels

Comments

@m-ou-se
Copy link
Owner

m-ou-se commented Aug 12, 2020

This snippet:

pub fn x(f: f32) -> u128 {
    f as u128
}

generates a lot more assembly than just a call to __fixunssfti. Probably because of the newly specified overflow handling?

This would be redundant when using floatconv's version, which already implements that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant