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] [JIT] ARM64 - Temporary fix for ldp/stp optimizations - with test fix #90758

Merged
merged 7 commits into from
Aug 17, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 17, 2023

Backport of #90700 to release/8.0

/cc @TIHan

Customer Impact

JIT produces bad code-gen which leads to invalid results.

Testing

Two tests were added to ensure we get the correct results.

Risk

Risk is very low as the likelihood of encountering the original bug was already very low. The change only impacts the original scenario.

Description

Resolves #85765

With the latest, the code-gen is quite different from what was reported in the issue, and therefore doesn't reproduce. But the issue still exists and is able to be reproduced by a different sample:

using System;
using System.Runtime.CompilerServices;

// Expected: 515
// Actual: 0
public unsafe class Program
{
    public static void Main()
    {
        byte* bytes = stackalloc byte[1024];
        bytes[0x1A] = 1;
        bytes[0x1B] = 2;
        int sum = Foo(bytes);
        Console.WriteLine(sum);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public static int Foo(byte* b)
    {
        return Unsafe.ReadUnaligned<int>(ref b[0x1A]) + Unsafe.ReadUnaligned<int>(ref b[0x1B]);
    }
}

@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 Aug 17, 2023
@ghost
Copy link

ghost commented Aug 17, 2023

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

Issue Details

Backport of #90700 to release/8.0

/cc @TIHan

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: -

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. please get a code review and we can merge

@TIHan
Copy link
Contributor

TIHan commented Aug 17, 2023

@dotnet/jit-contrib this is ready - was already reviewed before

@JulieLeeMSFT
Copy link
Member

CI errors are known issues.

@carlossanlop carlossanlop added the Servicing-approved Approved for servicing release label Aug 17, 2023
@carlossanlop carlossanlop merged commit a2953d7 into release/8.0 Aug 17, 2023
@carlossanlop carlossanlop deleted the backport/pr-90700-to-release/8.0 branch August 17, 2023 21:43
@ghost ghost locked as resolved and limited conversation to collaborators Sep 17, 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 Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants