Skip to content

Cranelift: add bitops simplification rules#12738

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

Cranelift: add bitops simplification rules#12738
myunbin wants to merge 1 commit intobytecodealliance:mainfrom
myunbin:bitops-add

Conversation

@myunbin
Copy link
Contributor

@myunbin myunbin commented Mar 6, 2026

This PR consolidates the changes from the following earlier PRs into a single branch:

Those PRs developed overlap and conflicts as more bitops rules were added to the same file. To make review and merging easier, this PR supersedes them and contains the combined, up-to-date version of the changes.

Supersedes #12730, #12732, #12734.

#12730 adds the following rule:

(x | z) & (y | z) => (x & y) | z

and its dual: (x & z) | (y & z) => (x | y) & z

#12732 adds the following rule:

(x | y) ^ (x | ~y) => ~x

#12734 adds the following rule:

(~x) & (~y) -> ~(x | y)

and its dual: (~x) | (~y) -> ~(x & y)

Apologies for the inconvenience.

cc @bongjunj

@myunbin myunbin requested a review from a team as a code owner March 6, 2026 05:25
@myunbin myunbin requested review from alexcrichton and removed request for a team March 6, 2026 05:25
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Mar 6, 2026
@github-actions
Copy link

github-actions bot commented Mar 6, 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