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

JIT: Assertion failed 'isContainable || supportsRegOptional' during 'Generate code' #78614

Closed
jakobbotsch opened this issue Nov 20, 2022 · 2 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@jakobbotsch
Copy link
Member

// Generated by Fuzzlyn v1.5 on 2022-11-20 15:58:15
// Run on X64 Linux
// Seed: 12213752758554040652
// Reduced from 297.8 KiB to 1.3 KiB in 00:12:04
// Hits JIT assert in Release:
// Assertion failed 'isContainable || supportsRegOptional' in 'Program:M72():byte' during 'Generate code' (IL size 142; hash 0xebc72f52; FullOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/hwintrinsiccodegenxarch.cpp Line: 61
// 
public struct S0
{
    public ushort F0;
    public sbyte F1;
}

public class C0
{
    public ulong F0;
    public C0(ulong f0)
    {
        F0 = f0;
    }
}

public class C1
{
    public bool F0;
}

public class Program
{
    public static IRuntime s_rt;
    public static S0 s_17;
    public static C0 s_19;
    public static C1 s_61;
    public static void Main()
    {
        M72();
    }

    public static sbyte M72()
    {
        C1 var0 = default(C1);
        ulong[][] var13 = default(ulong[][]);
        try
        {
            var0.F0 = s_61.F0;
        }
        finally
        {
            s_19.F0 &= ~(ulong)s_17.F0;
            bool vr1 = var0.F0;
            if (var0.F0)
            {
                C0 var3 = new C0(0);
                bool vr0 = var0.F0;
                M83();
                s_rt.WriteLine(var3.F0);
            }
            else
            {
                s_rt.WriteLine(var13[0][0]);
            }
        }

        return s_17.F1;
    }

    public static byte[] M83()
    {
        return default(byte[]);
    }
}

public interface IRuntime
{
    void WriteLine<T>(T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(T value) => System.Console.WriteLine(value);
}

cc @tannergooding, exposed by #77895

@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 20, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 20, 2022
@ghost
Copy link

ghost commented Nov 20, 2022

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

Issue Details
// Generated by Fuzzlyn v1.5 on 2022-11-20 15:58:15
// Run on X64 Linux
// Seed: 12213752758554040652
// Reduced from 297.8 KiB to 1.3 KiB in 00:12:04
// Hits JIT assert in Release:
// Assertion failed 'isContainable || supportsRegOptional' in 'Program:M72():byte' during 'Generate code' (IL size 142; hash 0xebc72f52; FullOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/hwintrinsiccodegenxarch.cpp Line: 61
// 
public struct S0
{
    public ushort F0;
    public sbyte F1;
}

public class C0
{
    public ulong F0;
    public C0(ulong f0)
    {
        F0 = f0;
    }
}

public class C1
{
    public bool F0;
}

public class Program
{
    public static IRuntime s_rt;
    public static S0 s_17;
    public static C0 s_19;
    public static C1 s_61;
    public static void Main()
    {
        M72();
    }

    public static sbyte M72()
    {
        C1 var0 = default(C1);
        ulong[][] var13 = default(ulong[][]);
        try
        {
            var0.F0 = s_61.F0;
        }
        finally
        {
            s_19.F0 &= ~(ulong)s_17.F0;
            bool vr1 = var0.F0;
            if (var0.F0)
            {
                C0 var3 = new C0(0);
                bool vr0 = var0.F0;
                M83();
                s_rt.WriteLine(var3.F0);
            }
            else
            {
                s_rt.WriteLine(var13[0][0]);
            }
        }

        return s_17.F1;
    }

    public static byte[] M83()
    {
        return default(byte[]);
    }
}

public interface IRuntime
{
    void WriteLine<T>(T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(T value) => System.Console.WriteLine(value);
}

cc @tannergooding, exposed by #77895

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Nov 20, 2022
@jakobbotsch jakobbotsch added this to the 8.0.0 milestone Nov 20, 2022
@tannergooding
Copy link
Member

No longer repros. Believe this got fixed some time back as part of some other containment fixes that went in.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 10, 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

No branches or pull requests

2 participants