bongjunj opened PR #14231 from bongjunj:mul-max-max 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, this PR adds an arithmetic peephole optimization which performs
(max (-x) x) * (max (-x) x) = x * x.
This PR includes commutative variants and the filetests (both egraph and runtest).Thanks for reading!
bongjunj requested wasmtime-compiler-reviewers for a review on PR #14231.
bongjunj requested cfallin for a review on PR #14231.
github-actions[bot] added the label cranelift on PR #14231.
github-actions[bot] added the label isle on PR #14231.
github-actions[bot] commented on PR #14231:
Subscribe to Label Action
cc @avanhatt, @cfallin, @fitzgen, @mmcloughlin
<details>
This issue or pull request has been labeled: "cranelift", "isle"Thus the following users have been cc'd because of the following labels:
- avanhatt: isle
- cfallin: isle
- fitzgen: isle
- mmcloughlin: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
Last updated: Aug 30 2026 at 09:07 UTC