Skip to content

JIT: Assertion failed 'cond == test' during 'Optimize post-layout'  #103252

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v1.6 on 2024-06-09 16:24:09
// Run on X86 Windows
// Seed: 1355796564435856377
// Reduced from 42.7 KiB to 1.5 KiB in 00:01:57
// Hits JIT assert in Release:
// Assertion failed 'cond == test' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Optimize post-layout' (IL size 219; hash 0xade6b36b; FullOpts)
// 
//     File: D:\a\_work\1\s\src\coreclr\jit\optimizer.cpp Line: 2483
// 
using System.Runtime.CompilerServices;

public struct S0
{
    public int F0;
}

public class C0
{
    public long F0;
    public S0 F3;
    public uint F4;
    public short F7;
    public sbyte F9;
}

public struct S1
{
    public ulong F0;
    public short F3;
}

public struct S2
{
    public S1 F0;
}

public struct S3
{
    public S2 F2;
    public byte F4;
}

public class C1
{
    public int F1;
    public uint F3;
    public C1(int f1, uint f3)
    {
        F1 = f1;
        F3 = f3;
    }
}

public struct S4
{
    public C0 F1;
}

public struct S5
{
    public S1 F1;
    public C0 F2;
    public S4 F3;
}

public class Program
{
    public static IRuntime s_rt;
    public static void Main()
    {
        S5 vr9 = default(S5);
        S3 vr10 = default(S3);
        if ((vr9.F2.F0 >= (vr9.F3.F1.F3.F0 / vr9.F2.F0)) == !(vr9.F3.F1.F4 >= 0))
        {
            if (vr9.F2.F9 >= vr9.F3.F1.F9)
            {
                vr9.F2.F7 = vr9.F1.F3;
            }
            else
            {
                s_rt.WriteLine(vr10.F2.F0.F0);
                s_rt.WriteLine(vr10.F4);
                var vr11 = new C1(0, 0);
                var vr12 = new C1(0, 0);
                var vr13 = new C1(0, 0);
            }
        }
    }
}

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

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

cc @amanasifkhalid

Metadata

Metadata

Labels

Priority:2Work that is important, but not critical for the releasearea-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