Repository navigation
JIT: Redundant bounds check is not eliminated #109677
Copy link
Copy link
Open
Labels
User StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
A tracking issue to link all cases currently not optimized by RyuJIT around bounds checking. Contributes to #94941
Checks inside loops
- Safe vectorization is a lot slower than unsafe #111309
- Bounds check after overlapping span length checks #121262
- JIT does not hoist bound check outside a loop #69194
- Optimization of array bounds checks involving bitwise AND could be improved #65550
- Loops aren't cloned for Spans #82946
- Closed by Loop cloning for Span #113575
- JIT doesn't elide bounds checking when iterating over a span and an array of known length #110986
- Closed by Loop cloning for Span #113575
- Redundant bounds check #104890
- Bounds checks are no longer elided when using nint for indexing. #44415
- Elide bounds checks for partial array/span iteration #31638
- JIT: Index use can't be completely optimized away #11870
- [JIT] Elide bounds check for reverse iteration over arrays and spans #9505
- JIT: Bounds check not elided for inlined function with safe arguments on Windows #112019
- Closed by Loop cloning for Span #113575
- JIT: Missed
i >= 0assertion #113809 - JIT: Redundant bounds check for when loopUpperBound==arrayLength #114744
Multidimensional arrays
- JIT: Unnecessary bounds checks for MD array accesses #103321
- Loop cloning can't eliminate bounds check when assigning to multi-dim jagged array #54074
Miscellaneous
- Redundant bounds check #121259
- JIT: Bounds check for "i + cns < arrlen" bound #112523
- JIT: Block clonning for subsequent bounds checks #112524
- Codegen: Bound check not elided in ref struct Span field index access #72004
- JIT: Improve rangecheck for certain binops #79257
- C# value discard leads to range check for happy path #99943
- Manual bounds checks are less efficient #80256
- Extra bound checks are not eliminated for pinning #35748
- [JIT] Redundant Span<> bounds check not elided for fields in ref structs #10645
- Use stelm.ref helper calls towards array bounds check assertions and range check elimination #8096
- Redundant bounds check for arr[X >> CNS] pattern #109899
- JIT: Redundant bound check #111027
- JIT: Redundant bounds check depending on branch order #113054
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
User StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Type
Projects
- StatusShow more project fieldsTeam User Stories
Activity
dotnet-policy-service commentedon Nov 10, 2024
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
neon-sunset commentedon Nov 10, 2024
Not sure if the issue #109043 belongs here too since it does not go through normal bounds check but otherwise seems related.
MichalPetryka commentedon Nov 10, 2024
This should also include reverse loops, iterating over multiple collections at once and non 1 increments.
EgorBo commentedon Nov 10, 2024
I think it indeed duplicates #80256
We're going to close/merge some of these issues as duplicates
It's in the list already - #9505
JulieLeeMSFT commentedon Dec 11, 2025
Adding #121795.