Skip to content

cranelift: add arithmetic opt rules - #14231

Open
bongjunj wants to merge 1 commit into
bytecodealliance:mainfrom
bongjunj:mul-max-max
Open

cranelift: add arithmetic opt rules#14231
bongjunj wants to merge 1 commit into
bytecodealliance:mainfrom
bongjunj:mul-max-max

Conversation

@bongjunj

Copy link
Copy Markdown
Contributor

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
bongjunj requested a review from a team as a code owner August 29, 2026 05:47
@bongjunj
bongjunj requested review from cfallin and removed request for a team August 29, 2026 05:47
@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Aug 29, 2026
@github-actions

Copy link
Copy Markdown

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 .github/subscribe-to-label.json configuration file.

Learn more.

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.

1 participant