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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv64: Fix regalloc panic with bor+bnot on floats #5857

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

afonso360
Copy link
Contributor

👋 Hey,

With zbb enabled we were optimizing bor+bnot into the orn instruction. We were accidentally also enabling this operation for floats without first moving the float to an integer register. This caused a regalloc error since we can't use those instructions directly on floats.

I've also tried to restrict the matches for some other rules that could probably suffer the same issue. Though the fuzzer hasn't complained about those yet.

@afonso360 afonso360 changed the title riscv64: Fix regaloc panic with bor+bnot on floats riscv64: Fix regalloc panic with bor+bnot on floats Feb 22, 2023
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Feb 22, 2023
Copy link
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for fixing this!

@afonso360 afonso360 added this pull request to the merge queue Mar 13, 2023
Merged via the queue into bytecodealliance:main with commit ad0bce3 Mar 13, 2023
@afonso360 afonso360 deleted the riscv64-fix-orn-regalloc branch March 13, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants