Skip to content

Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic - #165923

Open
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:generic-simd-array-return
Open

beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:generic-simd-array-return

Conversation

@beetrees

@beetrees beetrees commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

codegen_intrinsic_call already stores the result to the return place for non-ZST BackendRepr::Memory types, so there's no need to convert the LLVM integer to a LLVM array when it's going to get stored the same anyway. This PR also fixes the llret_ty passed to generic_simd_intrinsic to be void when the intrinsic returns nothing (i.e. when the Rust return type is a ZST) - this change is just to allow for future improvements elsewhere, as llret_ty is unused for intrinsics that don't return anything.

r? @workingjubilee

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 13, 2026
@rustbot

rustbot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

workingjubilee is currently at their maximum review capacity.
They may take a while to respond.

@rust-bors

This comment has been minimized.

@beetrees
beetrees force-pushed the generic-simd-array-return branch from ac208b4 to 30a6ef9 Compare November 16, 2026 06:56
@rustbot

rustbot commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants