Skip to content

Assertion failed '!"Shouldn't see an integer typed GT_MOD node in ARM64"' during 'Linear scan register alloc'  #68470

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v1.5 on 2022-04-24 15:14:54
// Run on Arm64 Linux
// Seed: 7206833594945368341
// Reduced from 60.6 KiB to 1.0 KiB in 00:02:25
// Hits JIT assert in Debug:
// Assertion failed '!"Shouldn't see an integer typed GT_MOD node in ARM64"' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Linear scan register alloc' (IL size 23; hash 0xade6b36b; MinOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/lsraarm64.cpp Line: 301
// 
public class Program
{
    public static short s_27;
    public static ushort s_29;
    public static long s_38;
    public static void Main()
    {
        CollectibleALC alc = new CollectibleALC();
        System.Reflection.Assembly asm = alc.LoadFromAssemblyPath(System.Reflection.Assembly.GetExecutingAssembly().Location);
        System.Reflection.MethodInfo mi = asm.GetType(typeof(Program).FullName).GetMethod(nameof(MainInner));
        System.Type runtimeTy = asm.GetType(typeof(Runtime).FullName);
        mi.Invoke(null, new object[]{System.Activator.CreateInstance(runtimeTy)});
    }

    public static void MainInner(IRuntime rt)
    {
        s_38 = ((s_29 * 0) * (s_27 % 1));
    }
}

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

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

public class CollectibleALC : System.Runtime.Loader.AssemblyLoadContext
{
    public CollectibleALC(): base(true)
    {
    }
}

Probably introduced by #66407. #18206 seems related.

cc @dotnet/jit-contrib @TIHan

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