dotnet / runtime

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

JIT: Assertion failed 'node->OperIs(GT_LCL_ADDR) && lvaGetDesc(node->AsLclVarCommon())->IsHiddenBufferStructArg()' during 'Morph - Global' #105565

Closed jakobbotsch closed 1 month ago

jakobbotsch commented 1 month ago
// Generated by Fuzzlyn v2.1 on 2024-07-26 14:27:48
// Run on X64 Windows
// Seed: 10399223447868889224-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base
// Reduced from 249.6 KiB to 0.9 KiB in 00:04:09
// Hits JIT assert in Release:
// Assertion failed 'node->OperIs(GT_LCL_ADDR) && lvaGetDesc(node->AsLclVarCommon())->IsHiddenBufferStructArg()' in 'Program:M19(S0):float' during 'Morph - Global' (IL size 25; hash 0x79d27466; FullOpts)
//
//     File: C:\dev\dotnet\runtime4\src\coreclr\jit\gentree.cpp Line: 19587
//
using System;
using System.Runtime.CompilerServices;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

public struct S0
{
    public Vector128<float> F2;
}

public struct S1
{
}

public struct S5
{
    public S0 F5;
    public S5(S0 f5) : this()
    {
    }
}

public class Program
{
    public static S1 s_3;
    public static long s_9;
    public static S5 s_23;
    public static void Main()
    {
        var vr3 = s_23.F5;
        bool vr4 = 0 > M19(vr3);
    }

    public static Vector128<float> M20()
    {
        var vr1 = new S5(new S0());
        M21();
        return Vector128.CreateScalar(-96.90504f);
    }

    public static float M19(S0 arg1)
    {
        arg1.F2 = M20();
        S1 var0 = s_3;
        return s_9;
    }

    public static void M21()
    {
    }
}
dotnet-policy-service[bot] commented 1 month ago

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