Skip to content

Assertion failed 'lclNode->GetSsaNum() == SsaConfig::FIRST_SSA_NUM' during 'VN based copy prop' #67346

@jakobbotsch

Description

@jakobbotsch

Description

The following program hits an assert on x64 Linux/Windows.

Reproduction Steps

// Generated by Fuzzlyn v1.5 on 2022-03-30 14:07:21
// Run on X64 Linux
// Seed: 12709134569258617074
// Reduced from 365.3 KiB to 0.5 KiB in 00:04:43
// Hits JIT assert in Release:
// Assertion failed 'lclNode->GetSsaNum() == SsaConfig::FIRST_SSA_NUM' in 'Program:M66(S2):S0' during 'VN based copy prop' (IL size 18; hash 0x9c4ee8df; FullOpts)
// 
//     File: /__w/1/s/src/coreclr/jit/copyprop.cpp Line: 308
// 
public struct S0
{
    public byte F0;
}

public struct S2
{
    public S0 F0;
}

public class Program
{
    public static void Main()
    {
        var vr5 = new S2();
        M66(vr5);
    }

    public static S0 M66(S2 arg0)
    {
        short vr13 = default(short);
        var vr3 = (sbyte)(18446744073709551615UL * (ulong)vr13);
        sbyte vr14 = vr3;
        short vr15 = default(short);
        var vr0 = vr15;
        return arg0.F0;
    }
}

Expected behavior

No assert hit.

Actual behavior

Assert hit.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

cc @dotnet/jit-contrib @SingleAccretion

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

Relationships

None yet

Development

No branches or pull requests

Issue actions