Stream: git-wasmtime

Topic: wasmtime / PR #12782 [Cranelift] add bit operation simpli...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 05:38):

myunbin opened PR #12782 from myunbin:bitops-add-03162026 to bytecodealliance:main:

This PR adds several bit operation simplification rules:

  1. x | ((x ^ y) ^ z) -> x | (y ^ z)
  2. (x ^ z) == (y ^ z) -> x == y
  3. y | ~(x | y) -> y | ~x and its dual: y & ~(x & y) -> y & ~x
  4. (~x) ^ (x | y) -> x | ~y
  5. (x < y) | (x > y) -> x != y
  6. ~((~x) & y) -> x | ~y and its dual: ~((~x) | y) -> x & ~y
  7. (x < y) | (x == y) -> x <= y
  8. (x ^ z) | ((x ^ z) ^ y) -> (x ^ z) | y
  9. x | (x ^ y) -> x | y
  10. ~((~x) + y) -> x - y
  11. (x ^ z) | (y | x) -> (y | x) | z
  12. (x | y) ^ (x ^ y) -> x & y
  13. x | (z & (x ^ y)) -> x | (z & y)
  14. (x | y) | (x ^ z) -> (x | y) | z
  15. (x ^ z) != (y ^ z) -> x != y
  16. (x & y) | (x & ~y) -> x and its dual: (x | y) & (x | ~y) -> x
  17. (x ^ y) | ~x -> ~(x & y)
  18. (x ^ y) ^ x -> y
  19. y | (x & (y | z)) -> y | (x & z) and its dual: y & (x | (y & z)) -> y & (x | z)
  20. y | (x ^ (y & z)) -> x | y
  21. ((x & y) ^ y) + z -> (y + z) - (x & y)
  22. y & (~y | x) -> y & x and its dual: y | (~y & x) -> y | x

I 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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 05:38):

myunbin requested wasmtime-compiler-reviewers for a review on PR #12782.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 05:38):

myunbin requested cfallin for a review on PR #12782.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 05:48):

myunbin updated PR #12782.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 09:03):

github-actions[bot] added the label cranelift on PR #12782.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 09:03):

github-actions[bot] added the label isle on PR #12782.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 09:03):

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:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 22:02):

cfallin submitted PR review:

LGTM -- thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 22:02):

cfallin added PR #12782 [Cranelift] add bit operation simplification rules to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 22:28):

cfallin merged PR #12782.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2026 at 22:28):

cfallin removed PR #12782 [Cranelift] add bit operation simplification rules from the merge queue.


Last updated: Mar 23 2026 at 16:19 UTC