myunbin opened PR #14697 from myunbin:add-rules-261013 to bytecodealliance:main:
Add mid-end optimization rules:
sextend(x) OP sextend(y) --> x OP y, whereOP = {!=, >=s, <=s, >=u, >u, <=u, <u}uextend(x) OP uextend(y) --> x OP y, whereOP = {!=, >=u, <=u}uextend(x) OPs uextend(y) --> x OPu y, whereOP = {>=, >, <=, <}(x != 0) | (y != 0) --> (x | y) != 0(x == 0) & (y == 0) --> (x | y) == 0select(c, C1, C2) OP C --> select(c, C1 OP C, C2 OP C), whereOP = {|, ^, -}C - select(c, C1, C2) --> select(c, C - C1, C - C2)(x >> k) OP (y >> k) --> (x OP y) >> k, whereOP = {&, |}(x >>s k) & (y >>u k) --> (x & y) >>u k((x & M) << k) & M --> (x << k) & M, whereM = 2^n − 1~x & (x | y) --> ~x & y~x ^ C --> x ^ ~C~(x & y) & (x | y) --> x ^ y~(x & y) | x --> -1and revised some annotations.
Thanks!
myunbin requested fitzgen for a review on PR #14697.
myunbin requested wasmtime-compiler-reviewers for a review on PR #14697.
github-actions[bot] added the label cranelift on PR #14697.
github-actions[bot] added the label isle on PR #14697.
github-actions[bot] commented on PR #14697:
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 <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:thumbs_up: fitzgen submitted PR review:
Thanks!
fitzgen added PR #14697 Cranelift: add mid-end opt rules to the merge queue.
github-merge-queue[bot] removed PR #14697 Cranelift: add mid-end opt rules from the merge queue.
alexcrichton added PR #14697 Cranelift: add mid-end opt rules to the merge queue.
:check: alexcrichton merged PR #14697.
alexcrichton removed PR #14697 Cranelift: add mid-end opt rules from the merge queue.
Last updated: Oct 31 2026 at 23:03 UTC