Skip to content

Assertion failed '(consume == 0) || (ComputeAvailableSrcCount(tree) == consume)' #111835

@EgorBo

Description

@EgorBo

Compile the following method with Checked JIT:

public bool EqualsTest(byte* a, byte* b, nuint len)
{
    for (nuint i = 0; i < len; i += 128)
    {
        var v11 = Vector512.LoadAligned(a + i);
        var v12 = Vector512.LoadAligned(a + i + 64);
        var v21 = Vector512.LoadAligned(b + i);
        var v22 = Vector512.LoadAligned(b + i + 64);
        if (((v11 ^ v21) | (v12 ^ v22)) != Vector512<byte>.Zero)
            return false;
    }
    return false;
}

Expected: compiles
Actual:

Assert failure(PID 374500 [0x0005b6e4], Thread: 444996 [0x6ca44]): Assertion failed '(consume == 0) || (ComputeAvailableSrcCount(tree) == consume)' in 'Benchmarks:EqualsTest(ulong,ulong,ulong):ubyte:this' during 'Linear scan register alloc' (IL size 105; hash 0x96711b35; FullOpts)

    File: C:\prj\runtime-main\src\coreclr\jit\lsrabuild.cpp:1775
    Image: C:\prj\runtime-main\artifacts\bin\coreclr\windows.x64.Checked\CoreRun.exe

Metadata

Metadata

Assignees

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