Skip to content

Assertion failed 'a != b' during 'Do value numbering' #64761

@kunalspathak

Description

@kunalspathak
// Found by Antigen
// TestVars: COMPlus_TieredCompilation=0|COMPlus_JitOptRepeat=*|COMPlus_GCStress=0xC
//
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// This file is auto-generated.
// Seed: -1
//
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
public class TestClass
{
    public struct S1
    {
        public struct S1_D1_F1
        {
            public int int_0;
        }
        public float float_1;
        public ulong ulong_2;
    }
    public struct S2
    {
        public double double_3;
    }
    static short s_short_9 = -2;
    static int s_int_10 = -1;
    static long s_long_11 = 2147483646;
    static string s_string_14 = "C";
    static ushort s_ushort_15 = 5;
    static uint s_uint_16 = 5;
    static S1.S1_D1_F1 s_s1_s1_d1_f1_18 = new S1.S1_D1_F1();
    static S1 s_s1_19 = new S1();
    static S2 s_s2_20 = new S2();
    int int_27 = 1;
    long long_28 = -2;
    sbyte sbyte_29 = -2;
    uint uint_33 = 61;
    S1.S1_D1_F1 s1_s1_d1_f1_35 = new S1.S1_D1_F1();
    S1 s1_36 = new S1();
    S2 s2_37 = new S2();
    public int LeafMethod6()
    {
        unchecked
        {
            return 15+4;
        }
    }
    public float LeafMethod9()
    {
        unchecked
        {
            return s1_36.float_1;
        }
    }
    [MethodImpl(MethodImplOptions.NoInlining)]
    public S2 LeafMethod16()
    {
        unchecked
        {
            return s_s2_20;
        }
    }
    public S1.S1_D1_F1 Method4(out S1.S1_D1_F1 p_s1_s1_d1_f1_128, S1 p_s1_129, out S2 p_s2_130, ulong p_ulong_131, out S1.S1_D1_F1 p_s1_s1_d1_f1_132, long p_long_133, out S1 p_s1_134, ref S1 p_s1_135, S1 p_s1_136, S2 p_s2_137, S1.S1_D1_F1 p_s1_s1_d1_f1_138, ref S1 p_s1_139, ref float p_float_140, out uint p_uint_141, double p_double_142)
    {
        unchecked
        {
            S1.S1_D1_F1 s1_s1_d1_f1_157 = new S1.S1_D1_F1();
            S2 s2_159 = new S2();
            p_s1_s1_d1_f1_128 = p_s1_s1_d1_f1_138;
            p_s2_130 = s2_159;
            p_s1_s1_d1_f1_132 = s1_s1_d1_f1_157;
            p_s1_134 = s_s1_19;
            p_uint_141 = 15-4;
            return s_s1_s1_d1_f1_18;
        }
    }
    public ushort Method10(S1.S1_D1_F1 p_s1_s1_d1_f1_297, ref S2 p_s2_298, S1 p_s1_299, string p_string_300, S1 p_s1_301, ref short p_short_302, S1.S1_D1_F1 p_s1_s1_d1_f1_303, ref S2 p_s2_304, out S1.S1_D1_F1 p_s1_s1_d1_f1_305, ulong p_ulong_306, ref S1 p_s1_307, ref double p_double_308)
    {
        unchecked
        {
            S1.S1_D1_F1 s1_s1_d1_f1_323 = new S1.S1_D1_F1();
            p_s1_s1_d1_f1_305 = s1_s1_d1_f1_323;
            return 15&4;
        }
    }
    public double Method31(S2 p_s2_900, S1 p_s1_901, ref S1 p_s1_902, ref S2 p_s2_903, ref int p_int_904, ref uint p_uint_905, ref uint p_uint_906, S2 p_s2_907, out S1 p_s1_908, ref S1.S1_D1_F1 p_s1_s1_d1_f1_909, ref long p_long_910, S1 p_s1_911, out S2 p_s2_912, out S1.S1_D1_F1 p_s1_s1_d1_f1_913, ref double p_double_914, S1 p_s1_915, S1 p_s1_916, out S1.S1_D1_F1 p_s1_s1_d1_f1_917)
    {
        unchecked
        {
            S1.S1_D1_F1 s1_s1_d1_f1_932 = new S1.S1_D1_F1();
            p_s1_908 = s_s1_19;
            p_s2_912 = s2_37;
            p_s1_s1_d1_f1_913 = s_s1_s1_d1_f1_18;
            p_s1_s1_d1_f1_917 = s1_s1_d1_f1_932;
            return 15+4;
        }
    }
    public short Method64(float p_float_1816, short p_short_1817, int p_int_1818, ref S2 p_s2_1819, ref S2 p_s2_1820, S1.S1_D1_F1 p_s1_s1_d1_f1_1821, float p_float_1822, ref int p_int_1823, sbyte p_sbyte_1824, S1 p_s1_1825, ref uint p_uint_1826, S2 p_s2_1827)
    {
        unchecked
        {
            return p_short_1817;
        }
    }
    public ulong Method89(S2 p_s2_2460, out S1.S1_D1_F1 p_s1_s1_d1_f1_2461, ref S2 p_s2_2462, ref S2 p_s2_2463, out int p_int_2464)
    {
        unchecked
        {
            short short_2470 = 0;
            uint uint_2477 = 2;
            S1.S1_D1_F1 s1_s1_d1_f1_2479 = new S1.S1_D1_F1();
            S1 s1_2480 = new S1();
            S2 s2_2481 = new S2();
            while (15>=4)
            {
                if ((Method64(LeafMethod9(), short_2470, int_27, ref s2_2481, ref s2_37, s_s1_s1_d1_f1_18, s1_36.float_1, ref s1_s1_d1_f1_35.int_0, sbyte_29, s1_36, ref s_uint_16, LeafMethod16()) & 15+4)!= short_2470)
                {
                }
                else
                {
                    Method4(out s1_s1_d1_f1_35, s1_2480, out s2_37, 2, out s_s1_s1_d1_f1_18, s_long_11 >>= s1_s1_d1_f1_35.int_0 ^= LeafMethod6(), out s_s1_19, ref s_s1_19, s1_36, s2_37, s_s1_s1_d1_f1_18, ref s_s1_19, ref s_s1_19.float_1, out uint_2477, Method31(s_s2_20, s_s1_19, ref s1_36, ref s2_37, ref s_int_10, ref uint_2477, ref uint_33, p_s2_2463, out s1_36, ref s_s1_s1_d1_f1_18, ref long_28, s_s1_19, out s2_37, out s_s1_s1_d1_f1_18, ref s2_37.double_3, s1_36, s1_36, out s1_s1_d1_f1_2479) + 15+4);
                }
            }
            return 15+4;
        }
    }
    public void Method0()
    {
        unchecked
        {
            S1.S1_D1_F1 s1_s1_d1_f1_2764 = new S1.S1_D1_F1();
            S2 s2_2766 = new S2();
            s_ushort_15 = Method10(s1_s1_d1_f1_2764, ref s_s2_20, s_s1_19, s_string_14 += 15+4, s1_36, ref s_short_9, s1_s1_d1_f1_35, ref s2_2766, out s_s1_s1_d1_f1_18, Method89(s2_37, out s_s1_s1_d1_f1_18, ref s2_37, ref s2_2766, out s_s1_s1_d1_f1_18.int_0), ref s_s1_19, ref s2_37.double_3);
            return;
        }
    }
    public static void Main(string[] args)
    {
        new TestClass().Method0();
    }
}
/*
Got output diff:
--------- Baseline ---------  

Environment:



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

Environment:

set COMPlus_TieredCompilation=0
set COMPlus_JitOptRepeat=*
set COMPlus_GCStress=0xC

Assert failure(PID 176028 [0x0002af9c], Thread: 128960 [0x1f7c0]): Assertion failed 'a != b' in 'TestClass:Method89(S2,byref,byref,byref,byref):long:this' during 'Do value numbering' (IL size 354)
    File: D:\git\dotnet-runtime\src\coreclr\jit\gentree.cpp Line: 17390
    Image: d:\git\dotnet-runtime\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\CoreRun.exe
*/

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions