Skip to content

Assertion failed 'store->TypeGet() == src->TypeGet()' during 'Optimize Valnum CSEs' #91443

@kunalspathak

Description

@kunalspathak
// Found by Antigen

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
using System.Numerics;
public class TestClass
{
    static Vector128<ulong> s_v128_ulong_28 = Vector128.CreateScalar((ulong)0);
    static Vector3 s_v3_42 = new Vector3(-4.9651165f, -2.1474836E+09f, 1.0375f);
    int int_54 = 1;
    Vector128<ulong> v128_ulong_69 = Vector128<ulong>.AllBitsSet;
    Vector3 v3_83 = new Vector3(-0.84615386f, 1.0566038f, -4.9693875f);
    static int s_loopInvariant = 9;
    public void Method0()
    {
        unchecked
        {
            try
            {
                if (Vector128.LessThanAny(v128_ulong_69 ^ s_v128_ulong_28| (v128_ulong_69 += v128_ulong_69), v128_ulong_69 & Vector128<ulong>.AllBitsSet& v128_ulong_69))
                {
                }
                else
                {
                    int __loopvar0 = s_loopInvariant;
                    while (15!=4)
                    {
                        if (__loopvar0 >= 15+4)
                            break;
                    }
                    switch (int_54)
                    {
                        case 0:
                        {
                            Vector3.Subtract(Vector3.Cross(s_v3_42, s_v3_42) + v3_83 - v3_83+ s_v3_42 * s_v3_42+ v3_83, s_v3_42 = v3_83 - s_v3_42- s_v3_42 - s_v3_42+ Vector3.Clamp(v3_83, v3_83, Vector3.UnitY));
                            break;
                        }
                        default:
                        {
                            break;
                        }
                    }
                }
            }
            finally
            {
            }
            return;
        }
    }
    public static void Main(string[] args)
    {
        new TestClass().Method0();
    }
}
/*
Environment:


Assert failure(PID 43728 [0x0000aad0], Thread: 32844 [0x804c]): Assertion failed 'store->TypeGet() == src->TypeGet()' in 'TestClass:Method0():this' during 'Optimize Valnum CSEs' (IL size 250; hash 0x46e9aa75; Tier0-FullOpts)
    File: D:\git\runtime\src\coreclr\jit\importer.cpp Line: 785
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x86.checked\tests\Core_Root\CoreRun.exe
*/

Metadata

Metadata

Assignees

Labels

arch-x86area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIos-windows

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions