- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Closed
Closed
Copy link
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Milestone
Description
In this example:
use std::mem::MaybeUninit;
extern {
    fn fill(p: *mut u16);
}
pub unsafe fn test() {
    let (mut buffer, mut buffer2): ([u16; 512], [u16; 256]) = MaybeUninit::uninit().assume_init();
    fill(buffer.as_mut_ptr());
    fill(buffer2.as_mut_ptr())
}there is a call to memcpy for one of the buffers that copies uninitialized data to it.
https://rust.godbolt.org/z/z1zcor
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.