You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
saethlin opened this issue
May 12, 2023
· 1 comment
Labels
A-codegenArea: Code generationA-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
In #105808 I am adding a hack to prevent combining place projections where one of assignments that would be optimized away contains a niche. This is because optimizing Vec::as_ptr to a single MIR statement that just loads the underlying *const T makes us lose the nonnull LLVM attribute in codegen.
(I am opening this issue early so I can link to it in the PR)
The text was updated successfully, but these errors were encountered:
So maybe we should use the same approach that repr(simd) is moving towards: just disallow place projections to the inner field entirely for such types. That makes this issue irrelevant -- as the project isn't there to be combined -- and the niche support ends up in the transmutes and such instead, where it sees the different types properly instead of just projections.
jyn514
added
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
A-codegen
Area: Code generation
labels
May 13, 2023
A-codegenArea: Code generationA-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
In #105808 I am adding a hack to prevent combining place projections where one of assignments that would be optimized away contains a niche. This is because optimizing
Vec::as_ptr
to a single MIR statement that just loads the underlying*const T
makes us lose thenonnull
LLVM attribute in codegen.(I am opening this issue early so I can link to it in the PR)
The text was updated successfully, but these errors were encountered: