Commit graph

2 commits

Author SHA1 Message Date
Karl Meakin
625b18027d Optimize SliceIndex::get impl for RangeInclusive
The checks for `self.end() == usize::MAX` and `self.end() + 1 > slice.len()`
can be replaced with `self.end() >= slice.len()`, since
`self.end() < slice.len()` implies both
`self.end() <= slice.len()` and
`self.end() < usize::MAX`.
2026-02-10 20:29:45 +00:00
Karl Meakin
d74b276d1d Precommit tests for SliceIndex method codegen
Add a `codegen-llvm` test to check the number of `icmp` instrucitons
generated for each `SliceIndex` method on the various range types. This
will be updated in the next commit when `SliceIndex::get` is optimized
for `RangeInclusive`.
2026-02-10 20:29:45 +00:00