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

Assertion failed '(genTypeSize(node->TypeGet()) == 16) || (genTypeSize(node->TypeGet()) == 32)' #52959

Closed
jkotas opened this issue May 19, 2021 · 6 comments · Fixed by #52985
Closed
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI bug untriaged New issue has not been triaged by the area owner
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented May 19, 2021

  1. Compile:
using System;
using System.Numerics;
using System.Reflection;
using System.Runtime.Intrinsics;

var mi = typeof(Vector128).GetMethod("AsVector128", new Type[] { typeof(Vector2) });
mi.Invoke(null, new object[] { new Vector2() });
  1. Run with VEX instruction encoding disabled:
set COMPlus_EnableAVX=0
set COMPlus_EnableSSE41=0
set COMPlus_ReadyToRun=0
corerun test.exe

Result:

Assert failure(PID 24192 [0x00005e80], Thread: 12184 [0x2f98]): Assertion failed '(genTypeSize(node->TypeGet()) == 16) || (genTypeSize(node->TypeGet()) == 32)' in 'System.Runtime.Intrinsics.Vector128:AsVector128(System.Numerics.Vector2):System.Runtime.Intrinsics.Vector128`1[Single]' during 'Lowering nodeinfo' (IL size 22)

    File: C:\runtime\src\coreclr\jit\lowerxarch.cpp Line: 5539
    Image: C:\runtime\artifacts\bin\coreclr\windows.x64.Checked\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 May 19, 2021
@jkotas jkotas added the bug label May 19, 2021
@jkotas jkotas added this to the 6.0.0 milestone May 19, 2021
@jkotas
Copy link
Member Author

jkotas commented May 19, 2021

This is regression introduce in last week or so.

jkotas added a commit to jkotas/runtimelab that referenced this issue May 19, 2021
@EgorBo
Copy link
Member

EgorBo commented May 19, 2021

@tannergooding can it be introduced by #51731 ?

jkotas added a commit to jkotas/runtimelab that referenced this issue May 19, 2021
@tannergooding
Copy link
Member

Yes, that's likely.

I'd guess that the node can also be TYP_SIMD12 and that code path isn't accounting for the adjustment when doing the calculations. I'll get a repro and then fix.

jkotas added a commit to jkotas/runtimelab that referenced this issue May 19, 2021
@tannergooding
Copy link
Member

I'm able to repro, this is from #52288 and is because I forgot to add in the node->SetSimdSize(16); during the final fixup.

Validating the fix locally and should have it up shortly.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 19, 2021
jkotas added a commit to jkotas/runtimelab that referenced this issue May 20, 2021
@VincentBu
Copy link
Contributor

Failed in runtime-coreclr jitstress-isas-x86 20210522.1
Failed tests:

JIT/Regression/JitBlue/Runtime_31615/Runtime_31615/Runtime_31615.sh
JIT/SIMD/CircleInConvex_ro/CircleInConvex_ro.sh
JIT/HardwareIntrinsics/General/Vector128_1/Vector128_1_ro/Vector128_1_ro.sh

Error message:

Assert failure(PID 66508 [0x000103cc], Thread: 2677846 [0x28dc56]): Assertion failed '(genTypeSize(node->TypeGet()) == 16) || (genTypeSize(node->TypeGet()) == 32)' in 'Runtime_31615:G2():System.Numerics.Vector2' during 'Lowering nodeinfo' (IL size 34)

File: /Users/runner/work/1/s/src/coreclr/jit/lowerxarch.cpp Line: 5539
Image: /private/tmp/helix/working/9C4708A3/p/corerun
task_for_pid(66508) FAILED 5 (os/kern) failure
/private/tmp/helix/working/9C4708A3/w/A0B708C8/e/JIT/Regression/JitBlue/Runtime_31615/Runtime_31615/Runtime_31615.sh: line 375: 66508 Abort trap: 6           (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /private/tmp/helix/working/9C4708A3/w/A0B708C8/e/JIT/Regression/Reports/JIT.Regression/JitBlue/Runtime_31615/Runtime_31615/Runtime_31615.output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/9C4708A3/p/corerun Runtime_31615.dll ''
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test Harness Exitcode is : 1
To run the test:

set CORE_ROOT=/tmp/helix/working/9C4708A3/p
/private/tmp/helix/working/9C4708A3/w/A0B708C8/e/JIT/Regression/JitBlue/Runtime_31615/Runtime_31615/Runtime_31615.sh
Expected: True
Actual:   False


Stack trace
   at JIT_Regression._JitBlue_Runtime_31615_Runtime_31615_Runtime_31615_._JitBlue_Runtime_31615_Runtime_31615_Runtime_31615_sh()

@tannergooding
Copy link
Member

This has a fix pending review via #52985

@ghost ghost closed this as completed in #52985 May 25, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2021
This issue was closed.
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 untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants