-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
riscv64: Improve scalar_to_vector
codegen for constants
#7189
Labels
cranelift:area:riscv64
Issues related to the RISC-V 64 backend.
cranelift:E-easy
Issues suitable for newcomers to investigate, including Rust newcomers!
Comments
scalar_to_vector
codegenscalar_to_vector
codegen for constants
Hey! I'm fairly new to Cranelift but would like to give it a try. |
Awesome 🎉 Let me know if you need any help getting started! |
BieVic
added a commit
to BieVic/wasmtime
that referenced
this issue
Oct 17, 2023
Additionally add an imm5_from_value extractor. Closes bytecodealliance#7189
BieVic
added a commit
to BieVic/wasmtime
that referenced
this issue
Oct 18, 2023
BieVic
added a commit
to BieVic/wasmtime
that referenced
this issue
Oct 18, 2023
Additionally add an imm5_from_value extractor. Closes bytecodealliance#7189
BieVic
added a commit
to BieVic/wasmtime
that referenced
this issue
Oct 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cranelift:area:riscv64
Issues related to the RISC-V 64 backend.
cranelift:E-easy
Issues suitable for newcomers to investigate, including Rust newcomers!
👋 Hey,
This is a fairly simple improvement. Cranelift's
scalar_to_vector
instruction grabs a scalar value and places it at the bottom of a vector register.We translate this into the
vmerge.vxm
instruction in the RISC-V backend.This is all fairly ok, but we don't have a rule to match the
vmerge.vim
instruction that can place an immediate value instead of a register.Implementing this should be fairly simple, we can create a rule similar to the existing ones but using a
imm5_from_value
extractror:This
imm5_from_value
extractor doesn't exist yet, but we already have an equivalent in thereplicated_imm5
extractor. It should be fairly easy to extract that into it's own separate extractor for use in this new rule.See the existing
uimm5_from_value
extractor for help.If anyone needs help working on this issue let me know!
The text was updated successfully, but these errors were encountered: