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

Handle float/double for RVA[cns] optimization in fgValueNumberConstLoad #80661

Merged
merged 1 commit into from Jan 15, 2023

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Jan 14, 2023

Follow up for #78783 to add support for double/float.

Example:

double Test()
{
    ReadOnlySpan<double> data = new double[] { 1.0, -2.0, 3.0, 4.0 };
    return data[1];
}

this now is folded into just return -2.0;

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 14, 2023
@ghost ghost assigned EgorBo Jan 14, 2023
@ghost
Copy link

ghost commented Jan 14, 2023

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

Issue Details

Example:

double Test()
{
    ReadOnlySpan<double> data = new double[] { 1.0, -2.0, 3.0, 4.0 };
    return data[1];
}

this now is folded into just return -2.0;

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@tannergooding
Copy link
Member

tannergooding commented Jan 15, 2023

Can we recognize similar for Vector.Create(span) and convert to a VEC_CNS?

@EgorBo
Copy link
Member Author

EgorBo commented Jan 15, 2023

Can we recognize similar for Vector.Create(span) and convert to a VEC_CNS?

Do you mean static readonly Vector = Vector.Create ? Yeah I have a local branch with it 🙂

@EgorBo
Copy link
Member Author

EgorBo commented Jan 15, 2023

PTAL @dotnet/jit-contrib - simple change

@EgorBo EgorBo merged commit e2e690b into dotnet:main Jan 15, 2023
@EgorBo EgorBo deleted the vn-rva-floating-point branch January 15, 2023 16:47
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants