div to shift for positive power of 2 divs
An attempt at adding isle opts for turning division by powers of two into ushr or sshr bit shifts
Subscribe to Label Action
cc @cfallin, @fitzgen
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.
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.
Ah ok: looking through that issue seems like the current div simplifications in that file also currently do nothing for the same reason...
@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.