Skip to content

JIT: Assertion failed 'FitsIn(tree->TypeGet(), value)' during 'Assertion prop' #113940

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v2.5 on 2025-03-26 17:56:02
// Run on Arm64 MacOS
// Seed: 14738797710062565441-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256
// Reduced from 190.7 KiB to 1.5 KiB in 00:02:14
// Hits JIT assert in Release:
// Assertion failed 'FitsIn(tree->TypeGet(), value)' in 'Program:M26(S0)' during 'Assertion prop' (IL size 210; hash 0xb2cb8560; FullOpts)
// 
//     File: /Users/runner/work/1/s/src/coreclr/jit/assertionprop.cpp Line: 2953
// 
using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public struct S0
{
    public int F0;
    public bool F1;
    public ushort F3;
    public sbyte F6;
    public long F7;
    public S0(int f8)
    {
    }
}

public struct S1
{
    public S0 F1;
    public sbyte F5;
    public S1(S0 f1) : this()
    {
        F1 = f1;
    }
}

public class Program
{
    public static IRuntime s_rt;
    public static S0 s_2;
    public static S1[] s_43;
    public static void Main()
    {
        var vr1 = new S0(0);
        M26(vr1);
    }

    public static void M26(S0 argThis)
    {
        S0 var0 = s_2;
        if (!(var0.F6 != -14975))
        {
            if (argThis.F1)
            {
                S0 var5 = var0;
                s_rt.WriteLine(var5.F6);
            }
            else
            {
                s_43 = new S1[]
                {
                    new S1(new S0(0)),
                    new S1(new S0(0)),
                    new S1(new S0(0)),
                    new S1(new S0(0)),
                    new S1(new S0(0)),
                    new S1(new S0(0)),
                    new S1(new S0(0)),
                    new S1(new S0(0))
                };
            }
        }
    }
}

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

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

There is an SPMI collection available that should work with build a37ae11: col.zip

cc @dotnet/jit-contrib

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runs

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions