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

[release/8.0] Fix fgOptimizeAddition opt for AOT #94418

Closed
wants to merge 2 commits into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 6, 2023

Backport of #94350 to release/8.0

/cc @EgorBo

Customer Impact

RyuJIT had an optimization that wasn't NativeAOT/R2R friendly:

(X + Const1) + (Y + Const2) was transformed into (X + Y) + Const3 (where Const3 is Const1 + Const2)

while in some cases it's not allowed to fold constants which require "relocs" (AOT). It seems that this transformation had this bug for several releases but only in .NET 8.0 we start to hit it because unrelated optimizations (like early expansion of fields) introduced more opportunities for it. A small repro is demonstrated in #94332

Testing

outerloop/NativeAOT testing, local tests

Risk

Low

@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 Nov 6, 2023
@ghost
Copy link

ghost commented Nov 6, 2023

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

Issue Details

Backport of #94350 to release/8.0

/cc @EgorBo

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo
Copy link
Member

EgorBo commented Nov 6, 2023

Is it too late to target .NET 8.0? I think this is not super important and can go to servicing

@akoeplinger
Copy link
Member

@EgorBo if you want this for 8.0 servicing then you need to target the release/8.0-staging branch

@jkotas jkotas deleted the backport/pr-94350-to-release/8.0 branch November 14, 2023 18:32
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 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.

3 participants