bongjunj opened PR #14201 from bongjunj:bongjun/new-rules to bytecodealliance:main:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->Hi, I added some missing optimization rules:
x - (-y << z) = x + (y << z)(x << y) | (z << y) = (x | z) << y(x & y) & (x & z) --> (x & y) & z- and one commutative variant of an existing rule
Also added unit test cases for these rules, and blessed minor changes of tests.
Thank you.
bongjunj requested cfallin for a review on PR #14201.
bongjunj requested wasmtime-compiler-reviewers for a review on PR #14201.
bongjunj requested wasmtime-core-reviewers for a review on PR #14201.
bongjunj updated PR #14201.
bongjunj edited PR #14201:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->Hi, I added some missing optimization rules:
x - (-y << z) = x + (y << z)(x << y) | (z << y) = (x | z) << y(x & y) & (x & z) --> (x & y) & z- and one commutative variant of an existing rule
Also added unit test cases for these rules, and blessed minor changes of tests.
Thank you.
Besides this PR, I noticed that the new ISLE verifier was integrated.
Do you have any plan to run the verifier for all existing midend/backend rules on a regular basis (like CI)?
github-actions[bot] added the label cranelift on PR #14201.
github-actions[bot] added the label isle on PR #14201.
github-actions[bot] commented on PR #14201:
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 #14201:
Do you have any plan to run the verifier for all existing midend/backend rules on a regular basis (like CI)?
Yes! See https://github.com/bytecodealliance/wasmtime/pull/13929 and https://github.com/bytecodealliance/wasmtime/pull/14207
:thumbs_up: fitzgen submitted PR review:
Thansk!
fitzgen added PR #14201 Cranelift: add mid-end optimization rules to the merge queue.
:check: fitzgen merged PR #14201.
fitzgen removed PR #14201 Cranelift: add mid-end optimization rules from the merge queue.
Last updated: Aug 30 2026 at 09:07 UTC