Skip to content

riscv64: Special-case f32const 0 and f64const 0 - #8701

Merged
alexcrichton merged 3 commits into
bytecodealliance:mainfrom
alexcrichton:riscv-special-case-zero-for-fconst-zero
May 30, 2024
Merged

alexcrichton merged 3 commits into
bytecodealliance:mainfrom
alexcrichton:riscv-special-case-zero-for-fconst-zero

Conversation

@alexcrichton

Copy link
Copy Markdown
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

@afonso360 afonso360 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
@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