Missed optimization: Array shadowed in same scope of declaration unnecessarily copied. #72313
Labels
A-mir-opt
Area: MIR optimizations
A-mir-opt-nrvo
Fixed by the Named Return Value Opt. (NRVO)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
C-optimization
Category: An issue highlighting optimization opportunities or PRs implementing such
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
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.
Edit: initial attempt at reducing the scope led to an incorrect example, updating with the motivating example.
https://rust.godbolt.org/z/g4imX-
The above shadow on line 119
let position_deltas = position_deltas;
results in a series of vmovups, but should be optimized to a noop.The text was updated successfully, but these errors were encountered: