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

More spaceship patterns #7702

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

scottmcm
Copy link
Contributor

This is a continuation of #7636 that added the spaceship patterns.

In particular, I noticed that what Rust currently does in sort_by

https://github.com/rust-lang/rust/blob/bf9229a2e366b4c311f059014a4aa08af16de5d8/library/core/src/slice/mod.rs#L3008

is a simplification pattern that I'd missed, so this adds that, and a couple other related things I saw in the area.

@scottmcm scottmcm requested a review from a team as a code owner December 18, 2023 22:33
@scottmcm scottmcm requested review from fitzgen and removed request for a team December 18, 2023 22:33
@@ -4,16 +4,23 @@
(rule (simplify (select ty _ x x)) x)
(rule (simplify (bitselect ty _ x x)) x)

;; Push zeroes to the right -- this makes the select `truthy`, as used elsewhere
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Specifically this truthy part:

(rule (truthy (select _ x (iconst_u _ (u64_nonzero _)) (iconst_u _ 0))) x)

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Dec 19, 2023
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "cranelift", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@fitzgen fitzgen added this pull request to the merge queue Dec 19, 2023
Merged via the queue into bytecodealliance:main with commit f8c9f67 Dec 19, 2023
18 checks passed
@scottmcm scottmcm deleted the more-icmp-isle branch December 19, 2023 21:59
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 isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants