Stream: git-wasmtime

Topic: wasmtime / PR #14234 Cranelift: add bitops and shifts rel...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 14:15):

zijian-yi opened PR #14234 from zijian-yi:bitops-opt-rules to bytecodealliance:main:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

This commit adds three bitops and shifts related mid-end optimization rules and filetests that target them. These filetests fail to optimize on main without these new rules.

(x << z) | (y << z) -> (x | y) << z
popcnt(bswap(x)) -> popcnt(x)
popcnt(bitrev(x)) == popcnt(x)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 14:16):

zijian-yi has marked PR #14234 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 14:16):

zijian-yi requested cfallin for a review on PR #14234.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 14:16):

zijian-yi requested wasmtime-compiler-reviewers for a review on PR #14234.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 17:44):

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 17:44):

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2026 at 17:45):

github-actions[bot] commented on PR #14234:

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:

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 (Aug 31 2026 at 20:56):

:thumbs_up: cfallin submitted PR review:

Looks good, and verifier passes with new verification queries -- thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 20:56):

cfallin added PR #14234 Cranelift: add bitops and shifts related opt rules to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 21:27):

github-merge-queue[bot] removed PR #14234 Cranelift: add bitops and shifts related opt rules from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 21:51):

cfallin commented on PR #14234:

@zijian-yi this has a merge conflict due to a concurrent PR that just landed (not your fault) -- would you mind rebasing now? Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 23:18):

zijian-yi updated PR #14234.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 23:20):

zijian-yi commented on PR #14234:

@zijian-yi this has a merge conflict due to a concurrent PR that just landed (not your fault) -- would you mind rebasing now? Thanks!

Thank you! Done.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 23:24):

zijian-yi edited PR #14234:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

This commit adds three bitops and shifts related mid-end optimization rules and filetests that target them. These filetests fail to optimize on main without these new rules.

(x << z) | (y << z) -> (x | y) << z
popcnt(bswap(x)) -> popcnt(x)
popcnt(bitrev(x)) -> popcnt(x)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 23:42):

cfallin has enabled auto merge for PR #14234.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2026 at 23:54):

cfallin added PR #14234 Cranelift: add bitops and shifts related opt rules to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 01 2026 at 04:35):

:check: cfallin merged PR #14234.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 01 2026 at 04:35):

cfallin removed PR #14234 Cranelift: add bitops and shifts related opt rules from the merge queue.


Last updated: Sep 20 2026 at 18:08 UTC