KGrewal1 opened PR #8474 from KGrewal1:div-opts
to bytecodealliance:main
:
An attempt at adding isle opts for turning division by powers of two into ushr or sshr bit shifts
KGrewal1 requested elliottt for a review on PR #8474.
KGrewal1 requested wasmtime-compiler-reviewers for a review on PR #8474.
github-actions[bot] commented on PR #8474:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
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 <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen commented on PR #8474:
I don't think this is viable yet because the e-graph cannot rewrite side effecting instructions in general, see https://github.com/bytecodealliance/wasmtime/issues/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 commented on PR #8474:
Ah ok: looking through that issue seems like the current div simplifications in that file also currently do nothing for the same reason...
elliottt closed without merge PR #8474.
elliottt commented on PR #8474:
@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.
Last updated: Dec 23 2024 at 12:05 UTC