Skip to content

JIT: Assertion failed 'node->IsUnusedValue() && "found an unmarked unused value"' during 'Lowering nodeinfo' #113338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jakobbotsch opened this issue Mar 10, 2025 · 4 comments · Fixed by #114272
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI arm-sve Work related to arm64 SVE/SVE2 support blocking-clean-ci-optional Blocking optional rolling runs
Milestone

Comments

@jakobbotsch
Copy link
Member

// Generated by Fuzzlyn v2.4 on 2025-03-09 17:40:34
// Run on Arm64 Windows
// Seed: 2919831583372544736-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256,armsve
// Reduced from 184.8 KiB to 1.0 KiB in 00:02:55
// Hits JIT assert in Release:
// Assertion failed 'node->IsUnusedValue() && "found an unmarked unused value"' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Lowering nodeinfo' (IL size 134; hash 0xade6b36b; FullOpts)
// 
//     File: D:\a\_work\1\s\src\coreclr\jit\lir.cpp Line: 1706
// 
using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public class C1
{
    public double F0;
}

public class Program
{
    public static void Main()
    {
        C1 vr27 = default(C1);
        var vr28 = Vector128.CreateScalar(-1).AsVector();
        var vr29 = Vector128.CreateScalar(0).AsVector();
        var vr30 = Sve.CreateTrueMaskUInt32();
        var vr31 = Vector128.CreateScalar(1757780578U).AsVector();
        var vr32 = Sve.CreateFalseMaskUInt32();
        var vr33 = Sve.ConditionalSelect(vr30, vr31, vr32);
        var vr34 = Vector.Create<uint>(0);
        var vr35 = Vector128.CreateScalar(687899908U).AsVector();
        var vr36 = Sve.ConditionalSelect(vr33, vr34, vr35);
        var vr37 = Sve.ShiftRightArithmetic(vr29, vr36);
        if (Sve.TestFirstTrue(vr28, vr37))
        {
            System.Console.WriteLine(System.BitConverter.DoubleToUInt64Bits(vr27.F0));
        }
    }
}

cc @dotnet/jit-contrib

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 10, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Mar 10, 2025
Copy link
Contributor

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

@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Mar 10, 2025
@jakobbotsch jakobbotsch added this to the 10.0.0 milestone Mar 10, 2025
@EgorBo EgorBo added the arm-sve Work related to arm64 SVE/SVE2 support label Mar 10, 2025
@jakobbotsch jakobbotsch added the blocking-clean-ci-optional Blocking optional rolling runs label Mar 31, 2025
@jakobbotsch
Copy link
Member Author

Similar example:

// Generated by Fuzzlyn v2.5 on 2025-03-30 17:25:31
// Run on Arm64 Windows
// Seed: 6164687101299398040-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256,armsve
// Reduced from 35.7 KiB to 0.7 KiB in 00:00:46
// Hits JIT assert in Release:
// Assertion failed 'node->IsUnusedValue() && "found an unmarked unused value"' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Lowering nodeinfo' (IL size 95; hash 0xade6b36b; FullOpts)
// 
//     File: D:\a\_work\1\s\src\coreclr\jit\lir.cpp Line: 1706
// 
using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public class Program
{
    public static uint s_1;
    public static void Main()
    {
        var vr7 = Sve.CreateTrueMaskInt32();
        var vr8 = Vector.Create<int>(0);
        var vr9 = Sve.CreateFalseMaskInt32();
        var vr10 = Sve.ConditionalSelect(vr7, vr8, vr9);
        var vr11 = Vector128.CreateScalar(12616752854119074364UL).AsVector();
        var vr12 = (int)Sve.SaturatingIncrementByActiveElementCount(0, vr11);
        var vr13 = Vector128.CreateScalar(vr12).AsVector();
        if (Sve.TestLastTrue(vr10, vr13))
        {
            System.Console.WriteLine(s_1);
        }
    }
}

@amanasifkhalid amanasifkhalid self-assigned this Mar 31, 2025
@amanasifkhalid
Copy link
Member

I'm running into the same issue as #114248 when I try to build the runtime on my arm64 Mac, and using an x64-arm64 crossjit as an altjit hits asserts in the importer. @dotnet/jit-contrib is anyone able to get me a SPMI collection of this? Thanks!

@kunalspathak
Copy link
Member

I can take a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI arm-sve Work related to arm64 SVE/SVE2 support blocking-clean-ci-optional Blocking optional rolling runs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants