Skip to content

IsMultiRegNode on ARM assumes all BITCASTs are multi-reg #71831

@SingleAccretion

Description

@SingleAccretion

Reproduction:

[MethodImpl(MethodImplOptions.NoInlining)]
static float Problem(StructWithFloats s, int i)
{
    s.FloatOne = BitConverter.Int32BitsToSingle(i);

    return s.FloatOne;
}

struct StructWithFloats
{
    public float FloatOne;
    public float FloatTwo;
    public float FloatThree;
    public float FloatFour;
    public float FloatFive;
}

Compile Problem with an AltJit targeting ARM.

Expected result: things compile fine.

Actual result:

Assert failure(PID 30040 [0x00007558], Thread: 28272 [0x6e70]): Assertion failed 'OperIs(GT_LCL_VAR, GT_LCL_VAR_ADDR, GT_STORE_LCL_VAR)' in 'RyuJitReproduction.Program:Problem(StructWithFloats,int):float' during 'Lowering nodeinfo' (IL size 20; hash 0x55cbbc91; FullOpts)

    File: C:\Users\Accretion\source\dotnet\runtime\src\coreclr\jit\gtstructs.h Line: 65
    Image: C:\Users\Accretion\source\dotnet\runtime\artifacts\bin\coreclr\windows.x64.Checked\CoreRun.exe

Cause: IsMultiRegNode presumes all BITCASTs on ARM are multi-reg nodes.

Exposed by #71567.

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions