Skip to content

Cranelift: Support loading and storing vector types smaller than 128bit #10254

Open
@bjorn3

Description

@bjorn3

Feature

While Cranelift can represent vector types smaller than 128bit, load and store operations for these smaller vector types are not implemented.

Benefit

Rustc has started passing vector types in vector registers on x86_64. Some of these vector types may be smaller than 128bit. Previously these vector types didn't need to be exposed to Cranelift as all vector operations are emulated by cg_clif using scalar operations. However now that they are passed in vector registers, cg_clif needs to use vector types at the ABI level and thus needs to support loading and storing small vectors.

Implementation

TODO: Do you have an implementation plan, and/or ideas for data structures or
algorithms to use?

Alternatives

Have a bunch of code in cg_clif dedicated to handling this. I probably need this anyway for the time being, but I prefer if I can get rid of it as soon as possible through native Cranelift support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    craneliftIssues related to the Cranelift code generatorenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions