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: Refactor and improve some rotate-related codegen #7251

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

alexcrichton
Copy link
Member

This commit expands the support a bit for zbb-extension rotates in the riscv64 backend. The lowering rules are all moved to lower.isle and some special cases are added for constant rotates as well.

Move from `inst.isle` to `lower.isle` since it's the only caller,
reorganize the rules to be a bit cleaner, add immediate shifting
specializations.
Same as the prior `rotl` lowerings, move the rules to `lower.isle` and
additionally add constant rules.
@alexcrichton alexcrichton requested a review from a team as a code owner October 16, 2023 13:58
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team October 16, 2023 13:58
Comment on lines 1225 to 1227
;;
(part1 Reg (rv_sll rs shamt))
;;
Copy link
Member

Choose a reason for hiding this comment

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

Empty comments?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't shoot the messenger -- but yeah I'll go through and clean this up

cranelift/codegen/src/isa/riscv64/lower.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/riscv64/lower.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/riscv64/lower.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/riscv64/lower.isle Outdated Show resolved Hide resolved
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Oct 16, 2023
@alexcrichton alexcrichton added this pull request to the merge queue Oct 16, 2023
Merged via the queue into bytecodealliance:main with commit fe7f060 Oct 16, 2023
@alexcrichton alexcrichton deleted the rv64-rotates branch October 16, 2023 19:25
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