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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

x64: Add support for fmsub and fnmsub instructions #8602

Open
afonso360 opened this issue May 12, 2024 · 2 comments
Open

x64: Add support for fmsub and fnmsub instructions #8602

afonso360 opened this issue May 12, 2024 · 2 comments
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift:E-compiler-easy Beginner鈥揑ntermediate compiler issues. cranelift:E-easy Issues suitable for newcomers to investigate, including Rust newcomers!

Comments

@afonso360
Copy link
Contributor

afonso360 commented May 12, 2024

馃憢 Hey,

Feature

Add support for the fmsub and fnmsub instructions in the x64 backend.

Benefit

This improves instruction selection quality for a few special fma cases.

Implementation

We already have support for the fmadd and fnmadd versions of these instructions here and here. So we adding support for these instructions should be a matter of introducing the new opcodes and implementing lowering rules similar to what already exists today.

Something similar was done in #8588 for the RISC-V backend. If anyone needs help implementing this, let me know!

@afonso360 afonso360 added cranelift:E-easy Issues suitable for newcomers to investigate, including Rust newcomers! cranelift:E-compiler-easy Beginner鈥揑ntermediate compiler issues. cranelift:area:x64 Issues related to x64 codegen labels May 12, 2024
@afonso360 afonso360 changed the title x64: Add support for fmsub and fnmsub x64: Add support for fmsub and fnmsub instructions May 12, 2024
@UnlimitedHummus
Copy link

Hey, I would like to try to implement this. I might need some help, as this is my first contribution.

If I have questions, should I ask them here or in Zulip?

@afonso360
Copy link
Contributor Author

Awesome! 馃帀

If I have questions, should I ask them here or in Zulip?

Up to you, I'm available in both. I might be able to give you a faster reply on Zulip since that usually sends me a notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift:E-compiler-easy Beginner鈥揑ntermediate compiler issues. cranelift:E-easy Issues suitable for newcomers to investigate, including Rust newcomers!
Projects
None yet
Development

No branches or pull requests

2 participants