dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.04k stars 4.68k forks source link

JIT: Assertion failed 'tree == stmt->GetRootNode()' #108406

Open JulieLeeMSFT opened 3 hours ago

JulieLeeMSFT commented 3 hours ago

Failed in Fuzzlyn/20240929.1

- linux-arm64 checked

Repro:

using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public class Program
{
    public static int s_17;
    public static void Main()
    {
        var vr2 = (uint)ArmBase.ReverseElementBits(0);
        var vr3 = (ushort)s_17;
        bool vr4 = Crc32.ComputeCrc32(vr2, vr3) >= 1;
        bool vr5 = vr4;
        vr4 ^= true;
        if (vr4)
        {
            bool vr6 = default(bool);
            vr4 = vr6;
        }
        else
        {
            vr4 = !vr4;
        }

        System.Console.WriteLine(vr4);
        System.Console.WriteLine(vr5);
    }
}

Distinct assertion error:

JIT assert failed:
Assertion failed 'tree == stmt->GetRootNode()' in 'Program:M0()' during 'VN-based dead store removal' (IL size 776; hash 0xaf50ff37; FullOpts)

    File: /__w/1/s/src/coreclr/jit/fgdiagnostic.cpp Line: 3597
dotnet-policy-service[bot] commented 3 hours ago

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

JulieLeeMSFT commented 3 hours ago

@amanasifkhalid, PTAL. CC @dotnet/jit-contrib.