saulecabrera requested wasmtime-compiler-reviewers for a review on PR #13829.
saulecabrera requested wasmtime-core-reviewers for a review on PR #13829.
saulecabrera requested fitzgen for a review on PR #13829.
saulecabrera opened PR #13829 from saulecabrera:winch-fix-clz-ctz to bytecodealliance:main:
Fixes https://github.com/bytecodealliance/wasmtime/issues/13746
Optimizes the fallback sequence emitted in clz/ctz for the x64 backend, emitting a conditional move to ensure that the destination register is always defined when the source register is zero.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
:thumbs_up: fitzgen submitted PR review:
Thanks!
fitzgen added PR #13829 winch(x64): Avoid undefined behavior on ctz/clz to the merge queue.
:check: fitzgen merged PR #13829.
fitzgen removed PR #13829 winch(x64): Avoid undefined behavior on ctz/clz from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC