Skip to content

Assertion failed 'ins != INS_invalid' #72158

@MichalStrehovsky

Description

@MichalStrehovsky

I know I keep doing this to myself (#72081), but I ran System.Runtime.Intrinsics.Tests with NativeAOT and checked JIT. Found another assert. This test is an assert goldmine. This one looks real.

Reproes with CoreCLR/corerun. Save this as test.cs and put where corerun is:

using System;
using Internal;
using System.Runtime.Intrinsics;

class Program
{
    static void Main()
    {
            Vector128<double> vector = Vector128.Create((double)1, 2);
            Vector128<double> result = Vector128.Shuffle(vector, Vector128.Create((long)1, 0));

            for (int index = 0; index < Vector128<double>.Count; index++)
            {
                Console.WriteLine(((double)(Vector128<double>.Count - index)).Equals(result.GetElement(index)).ToString());
            }
    }
}

Then do following:

csc test.cs /noconfig /nostdlib /r:System.Private.CoreLib.dll /O
set COMPlus_EnableSSE3=0
set COMPlus_TieredCompilation=0
corerun test.exe

Assert failure(PID 24760 [0x000060b8], Thread: 29804 [0x746c]): Assertion failed 'ins != INS_invalid' in 'Program:Main()' during 'Generate code' (IL size 91; hash 0xcb019401; FullOpts)

    File: C:\git\runtime2\src\coreclr\jit\hwintrinsiccodegenxarch.cpp Line: 121
    Image: C:\git\runtime2\artifacts\bin\coreclr\windows.x64.Debug\corerun.exe

JitDump here: jitdump.txt

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions