beetrees opened PR #10693 from beetrees:small-vector to bytecodealliance:main:
This PR adds support for loading, storing and bitcasting 16-bit, 32-bit and 64-bit vectors on the x64 and aarch64 backends (aarch64 already supported 64-bit vectors; additionally, the riscv64 backend already supports all three small vector sizes).
Fixes (for x64 and aarch64) #10254
beetrees requested fitzgen for a review on PR #10693.
beetrees requested wasmtime-compiler-reviewers for a review on PR #10693.
beetrees updated PR #10693.
beetrees updated PR #10693.
beetrees updated PR #10693.
beetrees has marked PR #10693 as ready for review.
beetrees updated PR #10693.
beetrees updated PR #10693.
beetrees updated PR #10693.
github-actions[bot] commented on PR #10693:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:area:x64", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen submitted PR review:
Thanks! Just a couple nitpicks to resolve before merging
fitzgen created PR review comment:
Can this and above return a
CodegenError::Unsupportedinstead of panicking?
fitzgen created PR review comment:
Tiny nitpick:
(4, Opcode::Vconst) => DataValue::V32(buffer.as_slice().try_into().expect("a 4-byte data buffer")), (2, Opcode::Vconst) => DataValue::V16(buffer.as_slice().try_into().expect("a 2-byte data buffer")),
fitzgen created PR review comment:
4 => DataValue::V32(mask.try_into().expect("a 4-byte vector mask")), 2 => DataValue::V16(mask.try_into().expect("a 2-byte vector mask")),
beetrees submitted PR review.
beetrees created PR review comment:
Neither
gen_storenorgen_loadreturn a result (and neither do their callers, or their callers callers etc.), so a lot of functions would need to be changed to return results in order the propagate the error. Would that be desirable?
beetrees updated PR #10693.
beetrees submitted PR review.
beetrees created PR review comment:
Done
beetrees submitted PR review.
beetrees created PR review comment:
Done
fitzgen submitted PR review.
fitzgen created PR review comment:
Ah I misread the diff and thought this was in a function that returned a result already. Given that it is not, and that it already panics on types that it cannot load/store, this is fine as-is.
fitzgen submitted PR review:
Thanks again!
beetrees updated PR #10693.
beetrees commented on PR #10693:
Fixed the Windows test failure.
fitzgen submitted PR review.
fitzgen merged PR #10693.
Last updated: Jan 10 2026 at 20:04 UTC