cfallin opened PR #14652 from cfallin:fix-i128-shift-amounts to bytecodealliance:main:
In several lowering rules that match on patterns around shifts, an i128-sized shift amount caused a compiler panic because its representation consists of multiple registers. Shifts in Cranelift always mask the shift amount (to a power-of-2) so taking the low 64-bit register of the shift amount is correct/lossless and avoids the panic.
<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested alexcrichton for a review on PR #14652.
cfallin requested wasmtime-compiler-reviewers for a review on PR #14652.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton has enabled auto merge for PR #14652.
alexcrichton added PR #14652 Cranelift: x64: fix i128 shift amounts in several lowering rules. to the merge queue
github-actions[bot] added the label cranelift on PR #14652.
github-actions[bot] added the label cranelift:area:x64 on PR #14652.
:check: alexcrichton merged PR #14652.
alexcrichton removed PR #14652 Cranelift: x64: fix i128 shift amounts in several lowering rules. from the merge queue
Last updated: Oct 11 2026 at 04:10 UTC