Skip to content

[Cranelift] add simplification rules#12978

Open
myunbin wants to merge 1 commit intobytecodealliance:mainfrom
myunbin:add-rules-040726
Open

[Cranelift] add simplification rules#12978
myunbin wants to merge 1 commit intobytecodealliance:mainfrom
myunbin:add-rules-040726

Conversation

@myunbin
Copy link
Copy Markdown
Contributor

@myunbin myunbin commented Apr 7, 2026

This PR adds several simplification rules:

arithmetic.isle

  • min/max(x,x) --> x
  • max(max(x, y), x) --> max(x, y)
  • min(min(x, y), x) --> min(x, y)
  • min(max(x, y), y) --> y ; max(min(x, y), y) --> y
  • min(min(x, y), max(x, y)) --> min(x,y)
  • max(min(x, y), max(x, y)) --> max(x, y)
  • x > max(x, y) --> 0

@myunbin myunbin requested a review from a team as a code owner April 7, 2026 01:04
@myunbin myunbin requested review from cfallin and removed request for a team April 7, 2026 01:04
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

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 .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