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: Special-case f32const 0 and f64const 0 #8701

Conversation

alexcrichton
Copy link
Member

This commit is inspired by discussion on #8695 which made me remember the discussion around #7162 historically. In lieu of a deeper fix for the issue of "why can't iconst 0 use (zero_reg)" it's still possible to add special-cases to rules throughout the backend so this commit does that for generating zero-value floats.

This commit is inspired by discussion on bytecodealliance#8695 which made me remember
the discussion around bytecodealliance#7162 historically. In lieu of a deeper fix for
the issue of "why can't `iconst 0` use `(zero_reg)`" it's still possible
to add special-cases to rules throughout the backend so this commit does
that for generating zero-value floats.
@alexcrichton alexcrichton requested a review from a team as a code owner May 28, 2024 19:56
@alexcrichton alexcrichton requested review from elliottt and removed request for a team May 28, 2024 19:56
Copy link
Contributor

@afonso360 afonso360 left a comment

Choose a reason for hiding this comment

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

Nice! Thanks!

@afonso360 afonso360 added this pull request to the merge queue May 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 28, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 28, 2024
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label May 28, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
@alexcrichton
Copy link
Member Author

Received request to deprovision: The request was cancelled by the remote provider.

After 4 times in a row I'm going to deprovision myself for tonight.

@afonso360 afonso360 added this pull request to the merge queue May 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
@afonso360 afonso360 added this pull request to the merge queue May 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
prtest:full
@alexcrichton alexcrichton added this pull request to the merge queue May 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 29, 2024
@elliottt elliottt added this pull request to the merge queue May 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 30, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 30, 2024
@alexcrichton alexcrichton added this pull request to the merge queue May 30, 2024
Merged via the queue into bytecodealliance:main with commit 79146f0 May 30, 2024
118 checks passed
@alexcrichton alexcrichton deleted the riscv-special-case-zero-for-fconst-zero branch May 30, 2024 20:06
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 31, 2024
This commit is similar to bytecodealliance#8701 in that it adds a special case to
`store` operations to use the `zero` register when applicable.
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 31, 2024
This commit is similar to bytecodealliance#8701 in that it adds a special case to
`store` operations to use the `zero` register when applicable.
github-merge-queue bot pushed a commit that referenced this pull request May 31, 2024
* riscv64: Optimize storing zero to memory by using `zero_reg`

This commit is similar to #8701 in that it adds a special case to
`store` operations to use the `zero` register when applicable.

* Fix lowerings of `istore{8,16,32}`

* Add test for compressed stores
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