myunbin opened PR #12782 from myunbin:bitops-add-03162026 to bytecodealliance:main:
This PR adds several bit operation simplification rules:
x | ((x ^ y) ^ z)->x | (y ^ z)(x ^ z) == (y ^ z)->x == yy | ~(x | y)->y | ~xand its dual:y & ~(x & y)->y & ~x(~x) ^ (x | y)->x | ~y(x < y) | (x > y)->x != y~((~x) & y)->x | ~yand its dual:~((~x) | y)->x & ~y(x < y) | (x == y)->x <= y(x ^ z) | ((x ^ z) ^ y)->(x ^ z) | yx | (x ^ y)->x | y~((~x) + y)->x - y(x ^ z) | (y | x)->(y | x) | z(x | y) ^ (x ^ y)->x & yx | (z & (x ^ y))->x | (z & y)(x | y) | (x ^ z)->(x | y) | z(x ^ z) != (y ^ z)->x != y(x & y) | (x & ~y)->xand its dual:(x | y) & (x | ~y)->x(x ^ y) | ~x->~(x & y)(x ^ y) ^ x->yy | (x & (y | z))->y | (x & z)and its dual:y & (x | (y & z))->y & (x | z)y | (x ^ (y & z))->x | y((x & y) ^ y) + z->(y + z) - (x & y)y & (~y | x)->y & xand its dual:y | (~y & x)->y | xI added many rules at once in this PR. Although all rules have already been verified using the verifier, I apologize if reviewing this amount of changes causes fatigue.
If this workload feels too large, I will split the updates into smaller batches next time.
cc @bongjunj
myunbin requested wasmtime-compiler-reviewers for a review on PR #12782.
myunbin requested cfallin for a review on PR #12782.
myunbin updated PR #12782.
github-actions[bot] added the label cranelift on PR #12782.
github-actions[bot] added the label isle on PR #12782.
github-actions[bot] commented on PR #12782:
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 <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
cfallin submitted PR review:
LGTM -- thanks!
cfallin added PR #12782 [Cranelift] add bit operation simplification rules to the merge queue.
cfallin merged PR #12782.
cfallin removed PR #12782 [Cranelift] add bit operation simplification rules from the merge queue.
Last updated: Mar 23 2026 at 16:19 UTC