Skip to content
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

JIT: Assertion failed 'unreached' during Importation #106372

Closed
amanasifkhalid opened this issue Aug 13, 2024 · 3 comments · Fixed by #107053
Closed

JIT: Assertion failed 'unreached' during Importation #106372

amanasifkhalid opened this issue Aug 13, 2024 · 3 comments · Fixed by #107053
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@amanasifkhalid
Copy link
Member

On Windows x86:

// Found by Antigen
// Reduced from 161.42 KB to 874 B.


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
{
    static long s_long_11 = 1;
    static Vector128<int> s_v128_int_33 = Vector128.Create(-5, -5, 1, -5);
    Vector128<int> v128_int_83 = Vector128.Create(-5);
    Vector128<long> v128_long_85 = Vector128.Create((long)-1);
    public void Method0()
    {
        unchecked
        {
            AdvSimd.AddWideningUpper((15|4)* (v128_long_85 *= Vector128.CreateSequence(s_long_11, -2)), v128_int_83 + v128_int_83 | s_v128_int_33| v128_int_83 + s_v128_int_33- Vector128<int>.AllBitsSet - s_v128_int_33);
            return;
        }
    }
    public static void Main(string[] args)
    {
        new TestClass().Method0();
    }
}
/*
Got output diff:
--------- Baseline ---------  

Environment:



--------- Test ---------  

Environment:


Assert failure(PID 35056 [0x000088f0], Thread: 28500 [0x6f54]): Assertion failed 'unreached' in 'TestClass:Method0():this' during 'Importation' (IL size 116; hash 0x46e9aa75; Tier0)
    File: C:\wk\runtime\src\coreclr\jit\gentree.cpp:22552
    Image: C:\wk\runtime\artifacts\tests\coreclr\windows.x86.Checked\Tests\Core_Root\corerun.exe
*/
@amanasifkhalid amanasifkhalid added this to the 9.0.0 milestone Aug 13, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 13, 2024
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member

Hitting this bit of code in gtNewSimdCreateBroadcastNode

    if (varTypeIsLong(simdBaseType) && !op1->IsIntegralConst())
    {
        // TODO-XARCH-CQ: It may be beneficial to emit the movq
        // instruction, which takes a 64-bit memory address and
        // works on 32-bit x86 systems.
        unreached();
    }
#endif // TARGET_X86

@AndyAyersMS
Copy link
Member

@tannergooding FYI

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 in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
3 participants