myunbin opened PR #12926 from myunbin:add-arithmetic-040126 to bytecodealliance:main:
This PR adds several simplification rules:
arithmetic.isle
((x + y) - (x + z)) --> (y - z)((x - z) - (y - z)) --> (x - y)((x - y) - (x - z)) --> (z - y)min(x, y) + max(x, y) --> x + y((x - y) + (y + z)) --> (x + z)(x - (x + y)) --> -y(x + (y + (z - x))) --> (y + z)(x + y) == (y + x) --> true(x - y) != x --> y != 0
bitops.isle
((x & ~y) - (x & y)) --> ((x ^ y) - y)(x & ~y) | (~x & y) --> (x ^ y)(x & ~y) | (x ^ y) --> (x ^ y)(x & ~y) ^ ~x --> ~(x & y)
myunbin requested fitzgen for a review on PR #12926.
myunbin requested wasmtime-compiler-reviewers for a review on PR #12926.
myunbin edited PR #12926:
This PR adds several simplification rules:
arithmetic.isle
((x + y) - (x + z)) --> (y - z)((x - z) - (y - z)) --> (x - y)((x - y) - (x - z)) --> (z - y)min(x, y) + max(x, y) --> x + y((x - y) + (y + z)) --> (x + z)(x - (x + y)) --> -y(x + (y + (z - x))) --> (y + z)(x + y) == (y + x) --> true(x - y) != x --> y != 0
bitops.isle
((x & ~y) - (x & y)) --> ((x ^ y) - y)(x & ~y) | (~x & y) --> (x ^ y)(x & ~y) | (x ^ y) --> (x ^ y)(x & ~y) ^ ~x --> ~(x & y)cc @bongjunj
github-actions[bot] added the label cranelift on PR #12926.
github-actions[bot] added the label isle on PR #12926.
github-actions[bot] commented on PR #12926:
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>
fitzgen submitted PR review:
Thanks!
fitzgen added PR #12926 [Cranelift] add simplification rules to the merge queue.
fitzgen removed PR #12926 [Cranelift] add simplification rules from the merge queue.
fitzgen merged PR #12926.
Last updated: Apr 12 2026 at 23:10 UTC