Inconsistent bounds checking optimization in enumerated slice iterators #133979
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-optimization
Category: An issue highlighting optimization opportunities or PRs implementing such
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: bounds checks are optimized out
Instead, this happened: bounds checks are not optimized out
https://godbolt.org/z/jsxvaeez7
Meta
rustc --version --verbose
:Additional info
a[y]
orb
(not both as seen above) removes the produced bounds checks.filter
also removes the bounds checks.The text was updated successfully, but these errors were encountered: