Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kunalspathak opened this issue Feb 4, 2022 · 2 comments · Fixed by #65468
Closed

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

kunalspathak opened this issue Feb 4, 2022 · 2 comments · Fixed by #65468
Assignees
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@kunalspathak
Copy link
Member

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
@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Feb 4, 2022
@ghost
Copy link

ghost commented Feb 4, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

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
Author: kunalspathak
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

@BruceForstall BruceForstall added this to the 7.0.0 milestone Feb 8, 2022
@BruceForstall BruceForstall added arch-arm64 and removed untriaged New issue has not been triaged by the area owner labels Feb 8, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 16, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 17, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants