Skip to content

Cranelift: add mid-end opt rules - #14601

Open
myunbin wants to merge 1 commit into
bytecodealliance:mainfrom
myunbin:add-rules-261007
Open

myunbin wants to merge 1 commit into
bytecodealliance:mainfrom
myunbin:add-rules-261007

Conversation

@myunbin

@myunbin myunbin commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Add mid-end optimization rules:

  • sextend(x) OP sextend(y) --> x OP y where OP = {==, <s}
  • rotr(x, k) == rotr(y, k) --> x == y
  • select(c, x, y) OP select(c, y, x) --> x OP y, where OP = {&, |, ^}
  • select(x == y, 0, x ^ y) --> x ^ y
  • select(x != y, x ^ y, 0) --> x ^ y
  • select(k == 0, x, x OP k) --> x OP k, where OP= {ishl, ushr, sshr, rotl, rotr} and its dual(k != 0).

Thanks!

@myunbin
myunbin requested a review from a team as a code owner October 7, 2026 03:07
@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

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.

This branch has not been deployed

No deployments
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