Missed optimization: regression 1.29 -> 1.30, makes unnecessary load from memory #65876
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
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.
Consider this code: https://godbolt.org/z/QpiBK3 .
Code:
Asm (1.30):
We read from memory at line
let d = *b
(from%rdx
) and then we read from memory again at line(c, d, *b)
(again from%rdx
).But in Rust (unlike C and C++) we know that two mutable references cannot point to same location. So, we missed optimization. This is regression
The text was updated successfully, but these errors were encountered: