Skip to content

Check why f32 as u128 generates so much code #1

@m-ou-se

Description

@m-ou-se

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions