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

[Fuzzlyn] Arm64 failure for negation, cast, bitwise-and #84693

Closed
tannergooding opened this issue Apr 12, 2023 · 5 comments · Fixed by #84716
Closed

[Fuzzlyn] Arm64 failure for negation, cast, bitwise-and #84693

tannergooding opened this issue Apr 12, 2023 · 5 comments · Fixed by #84716
Assignees
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@tannergooding
Copy link
Member

1 reduced examples are available

// Generated by Fuzzlyn v1.5 on 2023-04-12 13:58:51
// Run on Arm64 MacOS
// Seed: 15653303803842509097
// Reduced from 14.3 KiB to 0.3 KiB in 00:00:10
// Debug: Outputs 255
// Release: Outputs -1
public class Program
{
    public static short s_2;
    public static void Main()
    {
        sbyte vr5 = (sbyte)M8(1);
    }

    public static uint M8(byte arg0)
    {
        s_2 = 1;
        arg0 = (byte)(-s_2);
        var vr1 = arg0 & arg0;
        System.Console.WriteLine(vr1);
        return 0;
    }
}
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Apr 12, 2023
@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 Apr 12, 2023
@ghost
Copy link

ghost commented Apr 12, 2023

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

Issue Details

1 reduced examples are available

// Generated by Fuzzlyn v1.5 on 2023-04-12 13:58:51
// Run on Arm64 MacOS
// Seed: 15653303803842509097
// Reduced from 14.3 KiB to 0.3 KiB in 00:00:10
// Debug: Outputs 255
// Release: Outputs -1
public class Program
{
    public static short s_2;
    public static void Main()
    {
        sbyte vr5 = (sbyte)M8(1);
    }

    public static uint M8(byte arg0)
    {
        s_2 = 1;
        arg0 = (byte)(-s_2);
        var vr1 = arg0 & arg0;
        System.Console.WriteLine(vr1);
        return 0;
    }
}
Author: tannergooding
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@TIHan
Copy link
Contributor

TIHan commented Apr 12, 2023

Reproduces on Windows ARM64 as well. Will look into it.

@TIHan
Copy link
Contributor

TIHan commented Apr 12, 2023

Still looking into the issue. Reproduces even with disabling these optimizations individually and in combination:

Does not reproduce on XARCH.

@TIHan
Copy link
Contributor

TIHan commented Apr 12, 2023

This reproduces in release/7.0 branch too.

@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Apr 12, 2023
@JulieLeeMSFT JulieLeeMSFT added this to the 8.0.0 milestone Apr 12, 2023
@TIHan
Copy link
Contributor

TIHan commented Apr 12, 2023

Disabling the optimization, fgOptimizeCastOnAssignment, fixes the issue though I don't think it's the cause. I think we are not handling NormalizeOnLoad variables correctly on ARM64.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Apr 12, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 18, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 19, 2023
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