Skip to content

JIT: Assertion failed 'isGeneralRegister(reg2)' during 'Generate code' #113337

Closed

Description

@jakobbotsch
// Generated by Fuzzlyn v2.4 on 2025-03-09 15:13:05
// Run on Arm64 Windows
// Seed: 7075707008869258884-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256,armsve
// Reduced from 47.0 KiB to 0.4 KiB in 00:00:50
// Hits JIT assert in Release:
// Assertion failed 'isGeneralRegister(reg2)' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Generate code' (IL size 38; hash 0xade6b36b; FullOpts)
// 
//     File: D:\a\_work\1\s\src\coreclr\jit\emitarm64.cpp Line: 5520
// 
using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public class Program
{
    public static sbyte[] s_7;
    public static void Main()
    {
        var vr9 = Vector64.Create<float>(0);
        if ((2147483647 == (-(int)AdvSimd.Extract(vr9, 1))))
        {
            s_7 = s_7;
        }
    }
}

Introduced/exposed by #112944. Can you PTAL @snickolls-arm?

cc @dotnet/jit-contrib

Activity

  1. ghost added
    area-CodeGen-coreclr
    on Mar 10, 2025
  2. added this to the 10.0.0 milestone on Mar 10, 2025
  3. dotnet-policy-service commented on Mar 10, 2025

    @dotnet-policy-service
    Contributor

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

  4. jakobbotsch commented on Mar 10, 2025

    @jakobbotsch
    MemberAuthor

    Likely same underlying issue:

    // Generated by Fuzzlyn v2.4 on 2025-03-09 16:04:33
    // Run on Arm64 Windows
    // Seed: 9604038468779382434-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256,armsve
    // Reduced from 298.6 KiB to 0.3 KiB in 00:02:55
    // Hits JIT assert in Release:
    // Assertion failed 'unreached' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Generate code' (IL size 34; hash 0xade6b36b; FullOpts)
    // 
    //     File: D:\a\_work\1\s\src\coreclr\jit\codegenarm64.cpp Line: 4810
    // 
    using System;
    using System.Numerics;
    using System.Runtime.Intrinsics;
    using System.Runtime.Intrinsics.Arm;
    
    public class Program
    {
        public static int[][] s_2;
        public static bool s_3;
        public static void Main()
        {
            s_3 ^= (2021486855 != (-(long)s_2[0][0]));
        }
    }
  5. snickolls-arm commented on Mar 11, 2025

    @snickolls-arm
    Contributor

    I've opened #113376 to fix this. The containment pass needed to check both of its operands, as there's no encoding for (extended register, immediate).

  6. added
    in-pr
    on Mar 13, 2025
  7. locked and limited conversation to collaborators on Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrin-pr

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions