Redundant bounds check is not elided #58388
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
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
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.
Nightly Playground link
Splitting a slice in two such that
left.len() <= right.len()
, then loopingleft.len()
times over the elements ofleft
andright
cannot overflow, but a bounds check is emitted forright[i]
regardless:The text was updated successfully, but these errors were encountered: