-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow constants using an Abi::Vector layout to be passed to the backend #118171
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @b-naber (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
This comment has been minimized.
This comment has been minimized.
This allows constant vectors using a repr(simd) type to be propagated through to the backend. This fixes a few issues with LLVM simd intrinsics where a constant vector is expected but cannot be produced by rust at opt-level=0.
The job Click to see the possible cause of the failure (guessed by this bot)
|
Thanks for the PR! However, conceptually what you are suggesting here is a huge change and has to be done extremely carefully. I don't think we have sufficient motivation for such a fundamental refactor of our immediate handling. This needs a compiler MCP for sure. The discussion here is also relevant: you are looking for a way to give vectors SSA variable treatment similar to Scalar and ScalarPair. If we do want to go with this, we definitely want a new variant in the interpreter's |
You say this fixes some issue. Where's that issue tracked, where can I find the details? I sure hope there's an easier way to resolve that. Generally whenever LLVM requires something to be a constant we want to represent it as a const generic in Rust. If you haven't done so already, please file an issue explaining the problem and your investigation of it. |
Thanks for the feedback! That makes sense. There may be alternative options to fix this issue, I would be happy to go with any better alternative that you can think of. I have created a bug report here. |
☔ The latest upstream changes (presumably #118408) made this pull request unmergeable. Please resolve the merge conflicts. |
r? compiler |
@GeorgeWort any updates on this? thanks |
I should have closed this PR sorry, all continuing related work is linked to from the issue #118209. |
This allows constant vectors using a repr(simd) type to be propagated through to the backend. This fixes a few issues with LLVM simd intrinsics where a constant vector is expected but cannot be produced by rust at opt-level=0.