mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
MIR GVN propagates MaybeUninit::uninit() as `const <uninit>` in aggregate constructions and codegen emits a memcpy from an `[N x i8] undef` global for each such field, which LLVM materializes as zero-initialization. We extract the existing `all_bytes_uninit` skip already present for `Rvalue::Use` and `Rvalue::Repeat` to a separate helper function, and use it in the `Rvalue::Aggregate` field loop.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.