Skip to content

Eliminate bound checks for "% arr.Length" when possible #130155

Description

@henriquewr

The idea is to eliminate bound checks for:

arr[(int)index % arr.Length] when index >= 0

arr[arr.Length % (int)index] when arr.Length > 0 and index <= arr.Length

arr[(uint)arr.Length % (uint)index] when arr.Length > 0 and index <= arr.Length

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItenet-performancePerformance related issueuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions