Stream: git-wasmtime

Topic: wasmtime / PR #6220 Optimize sign extension via shifts


view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2023 at 05:00):

alexcrichton opened PR #6220 from alexcrichton:more-shift-opts to bytecodealliance:main:

This commit adds egraph optimization patterns for left-shifting a value and then right-shifting it as a form of sign extending its lower bits. This matches the behavior of the WebAssembly i32.extend8_s instruction, for example. Note that the lowering of that WebAssembly instruction does not use shifts, but historical versions of LLVM that didn't support the instruction, or versions with the instruction disabled, will use shifts instead.

A second rule for reduction-of-extend being the same as the original value was added to keep an existing shift-related test passing as well.

<!--
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 ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2023 at 05:00):

alexcrichton requested abrown for a review on PR #6220.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2023 at 05:00):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #6220.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 15:52):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 18:31):

alexcrichton updated PR #6220.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 18:31):

alexcrichton has enabled auto merge for PR #6220.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 19:23):

alexcrichton merged PR #6220.


Last updated: Nov 22 2024 at 17:03 UTC