Skip to content

Sve: Assertion failed 'finalOne > 0' in 'TestClass:Method0():this' during 'Importation' #116888

Open
@kunalspathak

Description

@kunalspathak
// Found by Antigen
// Reduced from 342.86 KB to 1.33 KB.


using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;
using System.Runtime.Intrinsics.X86;
using System.Numerics;
public class TestClass
{
    public struct S1
    {
    }
    public struct S2
    {
    }
    static Vector<ulong> s_v_ulong_45 = Vector<ulong>.AllBitsSet;
    static S1 s_s1_51 = new S1();
    S1 s1_101 = new S1();
    S2 s2_102 = new S2();
    private static List<string> toPrint = new List<string>();
    public S2 Method14(ref S1 p_s1_448, S2 p_s2_449, out S2 p_s2_450, S1 p_s1_451, out S1 p_s1_452, Vector<ulong> p_v_ulong_453, out S1 p_s1_454)
    {
        unchecked
        {
            return s2_102;
        }
    }
    public void Method0()
    {
        unchecked
        {
            S1 s1_2842 = new S1();
            S2 s2_2843 = new S2();
            s2_2843 = Method14(ref s_s1_51, s2_102, out s2_102, s1_101, out s_s1_51, Sve.CreateTrueMaskUInt64(SveMaskPattern.LargestMultipleOf4) + s_v_ulong_45 + s_v_ulong_45- s_v_ulong_45 * s_v_ulong_45, out s1_2842);
            return;
        }
    }
    public static int Main(string[] args)
    {
        return Antigen();
    }
    public static int Antigen()
    {
        new TestClass().Method0();
        return string.Join(Environment.NewLine, toPrint).GetHashCode();
    }
}
/*
Environment:

set DOTNET_JitGuardedDevirtualizationMaxTypeChecks=1
set DOTNET_TC_OnStackReplacement=1
set DOTNET_TC_QuickJitForLoops=1
set DOTNET_TieredCompilation=0
set DOTNET_TC_OnStackReplacement_InitialCounter=1
set DOTNET_OSR_HitLimit=1
set DOTNET_JitStress=2
set DOTNET_JitThrowOnAssertionFailure=1
set DOTNET_LegacyExceptionHandling=1

Debug: 0
JIT assert failed:
Assertion failed 'finalOne > 0' in 'TestClass:Method0():this' during 'Importation' (IL size 105; hash 0x46e9aa75; MinOpts)

    File: D:\a\_work\1\s\src\coreclr\jit\simd.h Line: 1840

Release: 0
JIT assert failed:
Assertion failed 'finalOne > 0' in 'TestClass:Method0():this' during 'Importation' (IL size 93; hash 0x46e9aa75; FullOpts)

    File: D:\a\_work\1\s\src\coreclr\jit\simd.h Line: 1840


*/

You might not need all the environment variables to reproduce the issue.

Metadata

Metadata

Assignees

Labels

arch-arm64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIarm-sveWork related to arm64 SVE/SVE2 support

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions