Skip to content

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

Closed
github-actions[bot] wants to merge 2 commits into
release/8.0from
backport/pr-94350-to-release/8.0
Closed

[release/8.0] Fix fgOptimizeAddition opt for AOT#94418
github-actions[bot] wants to merge 2 commits into
release/8.0from
backport/pr-94350-to-release/8.0

Conversation

@github-actions
Copy link
Copy Markdown
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

@ghost ghost 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
Copy Markdown

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
Copy Markdown
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

@EgorBo EgorBo requested a review from jakobbotsch November 6, 2023 16:12
@akoeplinger
Copy link
Copy Markdown
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