Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Closed
SingleAccretion opened this issue Jul 8, 2022 · 1 comment · Fixed by #72020
Closed

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

SingleAccretion opened this issue Jul 8, 2022 · 1 comment · Fixed by #72020
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI bug
Milestone

Comments

@SingleAccretion
Copy link
Contributor

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.

@SingleAccretion SingleAccretion added bug area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jul 8, 2022
@SingleAccretion SingleAccretion added this to the 7.0.0 milestone Jul 8, 2022
@SingleAccretion SingleAccretion self-assigned this Jul 8, 2022
@ghost
Copy link

ghost commented Jul 8, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

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.

Author: SingleAccretion
Assignees: SingleAccretion
Labels:

bug, area-CodeGen-coreclr

Milestone: 7.0.0

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 12, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 18, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant