rust/compiler/rustc_codegen_llvm
Matthias Krüger 33b0238586
Rollup merge of #127168 - DianQK:cast-size, r=workingjubilee
Use the aligned size for alloca at args/ret when the pass mode is cast

Fixes #75839. Fixes #121028.

The `load` and `store` instructions in LLVM access the aligned size. For example, `load { i64, i32 }` accesses 16 bytes on x86_64: https://alive2.llvm.org/ce/z/n8CHAp.

BTW, this example is expected to be optimized to immediate UB by Alive2: https://rust.godbolt.org/z/b7xK7hv1c and https://alive2.llvm.org/ce/z/vZDtZH.

r? compiler
2024-07-02 17:47:48 +02:00
..
src Rollup merge of #127168 - DianQK:cast-size, r=workingjubilee 2024-07-02 17:47:48 +02:00
Cargo.toml sanitizers: Create the rustc_sanitizers crate 2024-04-08 12:05:41 -07:00
messages.ftl Use an error struct instead of a panic 2024-05-15 11:14:45 +02:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc dev guide.