Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

operand->gtUseNum == -1 during 'Generate code' #56953

Closed
kunalspathak opened this issue Aug 6, 2021 · 3 comments · Fixed by #57256
Closed

operand->gtUseNum == -1 during 'Generate code' #56953

kunalspathak opened this issue Aug 6, 2021 · 3 comments · Fixed by #57256
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@kunalspathak
Copy link
Member

// 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.Runtime.CompilerServices;
public class TestClass13
{
    public struct S1
    {
        public byte byte_1;
    }
    public struct S2
    {
    }
    public struct S3
    {
    }
    public struct S5
    {
        public struct S5_D1_F2
        {
            public S1 s1_1;
            public ushort uint16_2;
        }
    }
    static ushort s_uint16_11 = 19036;
    static S2 s_s2_15 = new S2();
    static S3 s_s3_16 = new S3();
    static S5.S5_D1_F2 s_s5_s5_d1_f2_18 = new S5.S5_D1_F2();
    static S5 s_s5_19 = new S5();
    static int s_loopInvariant = 1;
    [MethodImpl(MethodImplOptions.NoInlining)]
    public ushort LeafMethod11()
    {
        unchecked
        {
            return s_s5_s5_d1_f2_18.uint16_2  <<= 15|4; 
        }
    }
    public S3 Method4(ref S2 p_s2_0, S5.S5_D1_F2 p_s5_s5_d1_f2_1, S5.S5_D1_F2 p_s5_s5_d1_f2_2, ushort p_uint16_3, ref S5 p_s5_4, S5.S5_D1_F2 p_s5_s5_d1_f2_5, short p_int16_6)
    {
        unchecked
        {
            {
            } 
            return s_s3_16 ; 
        }
    }
    public void Method0()
    {
        unchecked
        {
            if ((s_uint16_11  %= s_s5_s5_d1_f2_18.uint16_2  <<= 15|4)< 15+4- LeafMethod11())
{}            else
{}{}            s_s3_16  = Method4(ref s_s2_15 , s_s5_s5_d1_f2_18 , s_s5_s5_d1_f2_18 , LeafMethod11(), ref s_s5_19 , s_s5_s5_d1_f2_18 , 11592 ); 
            return; 
        }
    }
    public static void Main(string[] args)
    {
        TestClass13 objTestClass13 = new TestClass13();
        objTestClass13.Method0();
    }
}
/*
Got output diff:
--------- Baseline ---------  

Environment:

COMPlus_JITMinOpts=1
COMPlus_TieredCompilation=1


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

Environment:

COMPlus_TieredCompilation=0
COMPlus_JitOptRepeat=*
COMPlus_JitNoUnroll=1


Assert failure(PID 29844 [0x00007494], Thread: 31760 [0x7c10]): Assertion failed 'operand->gtUseNum == -1' in 'TestClass13:Method0():this' during 'Generate code' (IL size 92)

    File: D:\git\runtime\src\coreclr\jit\codegenlinear.cpp Line: 1319
    Image: D:\git\runtime\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\CoreRun.exe


*/
@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Aug 6, 2021
@kunalspathak kunalspathak removed the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 6, 2021
@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

@jeffschwMSFT
Copy link
Member

@kunalspathak which area path would you recommend?

@kunalspathak kunalspathak added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 6, 2021
@kunalspathak
Copy link
Member Author

Should be codegen..not sure why it got removed by me.

@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 6, 2021
@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Aug 6, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 12, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 17, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 16, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants