Skip to content

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

Description

@jakobbotsch
// 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions