You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
paolobarbolini opened this issue
Jan 16, 2022
· 3 comments
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.
nikic
added
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
labels
Jan 16, 2022
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.
I tried this code:
I expected to see this happen: the assert is optimized away. By proving
a < 6
, even without knowingb
, we can assumea.min(b) < 6
.Instead, this happened: it doesn't optimize, but it does in the following conditions:
Why this matters
Prevents the
ptr_rotate
implementation from optimizing hererust/library/core/src/slice/rotate.rs
Line 161 in 7be8693
which would reduce the amount of assembly generated by #89714
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: