LLVM is unable to eliminate bounds checks with widening multiply #65931
Labels
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Demonstration:
Note that
hi
must be less thanarr.len()
. LLVM is unable to prove this, and inserts a bounds check on array access. Extract from the compiled assembly:Application: rust-random/rand#592
(Note: we have multiple implementations of widening multiply here.)
The text was updated successfully, but these errors were encountered: