alexcrichton requested fitzgen for a review on PR #12956.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12956.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #12956.
alexcrichton opened PR #12956 from alexcrichton:rsicv64-fix-replicated-imm5 to bytecodealliance:main:
This commit fixes the
replicated_imm5lowering rule in the riscv64 backend when applied tovconstinputs. This is reachable in WebAssembly viav128.const, for example, or via Cranelift optimizations. The previous iteration of the rule did not take lane width into account and always reduced the immediate as much as possible where the reduction needed to halt once the lane size had been reached.The fix here is to refactor the definition to have a rule-per-lane-width which handles the input constant. This is accompanied with some minor refactorings around available ISLE rules and such to handle more bit widths in more locations, have more faithful signatures, etc.
<!--
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
-->
github-actions[bot] added the label cranelift:area:aarch64 on PR #12956.
github-actions[bot] added the label cranelift on PR #12956.
fitzgen submitted PR review.
alexcrichton added PR #12956 riscv64: Fix replicated_imm5 lowering rule to the merge queue.
github-merge-queue[bot] removed PR #12956 riscv64: Fix replicated_imm5 lowering rule from the merge queue.
alexcrichton updated PR #12956.
alexcrichton has enabled auto merge for PR #12956.
alexcrichton added PR #12956 riscv64: Fix replicated_imm5 lowering rule to the merge queue.
github-merge-queue[bot] removed PR #12956 riscv64: Fix replicated_imm5 lowering rule from the merge queue.
alexcrichton updated PR #12956.
alexcrichton has enabled auto merge for PR #12956.
alexcrichton added PR #12956 riscv64: Fix replicated_imm5 lowering rule to the merge queue.
alexcrichton merged PR #12956.
alexcrichton removed PR #12956 riscv64: Fix replicated_imm5 lowering rule from the merge queue.
Ari4ka submitted PR review.
Last updated: Apr 12 2026 at 23:10 UTC