Skip to content

the type_use code should consider ABI-specific classifications #3547

Closed
@nikomatsakis

Description

@nikomatsakis

I've been digging into the type_use code a bit more. I found at least one broken cast: it considered u64 and double to be equivalent because they have the same size/repr, but this is not valid because scalars and floats go in different registers, at least when passed as parameters.

I've patched over this problem for now using but I am not confident that other cases are correct. ABI rules can be quite complex! We should certainly be considering the ABI classifications when we decide whether a monomorphic instance can be reused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions