Skip to content

Arm64: Better addressing mode for float/double array access #64819

@kunalspathak

Description

@kunalspathak

In #61293, we optimized the array access with better addressing mode, but we still need to improve it for float/double array types.

private static double[] Crb;

public double issue4(int n)
{
    double result = 0;
    for (int i = 0; i < n; i++)
    {
        result += Crb[i];
    }
    return result;
}
G_M38607_IG03:
            mov     x1, x0
            ldr     w2, [x1,#8]
            cmp     w20, w2
            bhs     G_M38607_IG06
            ubfiz   x2, x20, #3, #32
            add     x2, x2, #16
            ldr     d16, [x1, x2]
            fadd    d8, d16, d8
            add     w20, w20, #1
            cmp     w20, w19
            blt     G_M38607_IG03

Metadata

Metadata

Assignees

Labels

arch-arm64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions