storing in a variable results in needless copying #48533
Labels
A-codegen
Area: Code generation
A-mir-opt
Area: MIR optimizations
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
With this lib.rs
rustc lib.rs --crate-type lib -C opt-level=3 --emit=asm
produces this lib.s (cleaned up)The assembly for
bar
should not be longer than the assembly forfoo
.This is similar to #42870. I don't know if it's a duplicate or just similar.
The text was updated successfully, but these errors were encountered: