scalable vecs size incl. num vecs + no sret for scalable vecs#157915
Open
davidtwco wants to merge 2 commits into
Open
scalable vecs size incl. num vecs + no sret for scalable vecs#157915davidtwco wants to merge 2 commits into
davidtwco wants to merge 2 commits into
Conversation
lqd
approved these changes
Jun 15, 2026
This comment has been minimized.
This comment has been minimized.
The correct size for `Layout` of a scalable vector ought to include the number of vectors, otherwise we generate `memcpy` that do not copy the entire vector and things like that.
rustc typically uses a return area pointer if the size of a return value is larger than two pointers, except for SIMD vectors and now scalable vectors. Given the previous commit, scalable types are more likely to trigger this conditional than previously. This is already tested in the output of the `codegen-llvm/scalable-vectors/tuple-intrinsics.rs` test.
e7a57aa to
07d3384
Compare
Member
Author
|
@bors r=lqd rollup |
Contributor
This was referenced Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The correct size for
Layoutof a scalable vector ought to include the number of vectors, otherwise we generatememcpythat do not copy the entire vector and things like that. This is tested inui/scalable-vectors/layout.rs.Additionally, rustc typically uses a return area pointer if the size of a return value is larger than two pointers, except for SIMD vectors and now scalable vectors. Given the previous change, scalable types are more likely to trigger this conditional than previously. This is already tested in the output of the
codegen-llvm/scalable-vectors/tuple-intrinsics.rstest.r? @lqd