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

div to shift for positive power of 2 divs #8474

Closed
wants to merge 1 commit into from

Conversation

KGrewal1
Copy link
Contributor

An attempt at adding isle opts for turning division by powers of two into ushr or sshr bit shifts

@KGrewal1 KGrewal1 requested a review from a team as a code owner April 25, 2024 13:49
@KGrewal1 KGrewal1 requested review from elliottt and removed request for a team April 25, 2024 13:49
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Apr 25, 2024
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.

@fitzgen
Copy link
Member

fitzgen commented Apr 25, 2024

I don't think this is viable yet because the e-graph cannot rewrite side effecting instructions in general, see #5908 for more information.

I suspect that if you attempted to write a filetest exercising this rule, you'd find that it never fires because we never put division instructions into the egraph, and leave them in the "skeleton" outside of the graph.

@KGrewal1
Copy link
Contributor Author

Ah ok: looking through that issue seems like the current div simplifications in that file also currently do nothing for the same reason...

@elliottt
Copy link
Member

elliottt commented May 2, 2024

@KGrewal1 I'm going to close this PR for now, as it's not possible to implement these rules with the constraints of our current e-graph implementation. We can re-open this PR if that changes in the future.

@elliottt elliottt closed this May 2, 2024
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.

None yet

3 participants