dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.37k stars 4.75k forks source link

Assertion failed '((regArgMaskLive & RBM_FLTARG_REGS) == 0) && "Homing of float argument registers with circular dependencies not implemented."' #87515

Closed BruceForstall closed 1 year ago

BruceForstall commented 1 year ago

win/arm64

Pipeline: runtime-coreclr jitstress-isas-arm coreclr windows arm64 Checked jitstress_isas_nohwintrinsic @ Windows.11.Arm64.Open JIT.SIMD Work Item

https://dev.azure.com/dnceng-public/public/_build/results?buildId=302647&view=ms.vss-test-web.build-test-results-tab&runId=6137478&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab&resultId=110096

set DOTNET_TieredCompilation=0
set DOTNET_EnableHWIntrinsic=0
21:11:48.632 Running test: JIT/SIMD/AbsGeneric_r/AbsGeneric_r.dll

Assert failure(PID 9288 [0x00002448], Thread: 9176 [0x23d8]): Assertion failed '((regArgMaskLive & RBM_FLTARG_REGS) == 0) && "Homing of float argument registers with circular dependencies not implemented."' in 'System.Numerics.Vector:Abs[short](System.Numerics.Vector`1[short]):System.Numerics.Vector`1[short]' during 'Generate code' (IL size 185; hash 0xff7e0044; FullOpts)

    File: D:\a\_work\1\s\src\coreclr\jit\codegencommon.cpp Line: 3400
    Image: C:\h\w\BF8C09A5\p\corerun.exe

Related? https://github.com/dotnet/runtime/issues/87511 https://github.com/dotnet/runtime/issues/87388

ghost commented 1 year ago

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

Issue Details
win/arm64 Pipeline: runtime-coreclr jitstress-isas-arm coreclr windows arm64 Checked jitstress_isas_nohwintrinsic @ Windows.11.Arm64.Open JIT.SIMD Work Item https://dev.azure.com/dnceng-public/public/_build/results?buildId=302647&view=ms.vss-test-web.build-test-results-tab&runId=6137478&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab&resultId=110096 ``` set DOTNET_TieredCompilation=0 set DOTNET_EnableHWIntrinsic=0 ``` ``` 21:11:48.632 Running test: JIT/SIMD/AbsGeneric_r/AbsGeneric_r.dll Assert failure(PID 9288 [0x00002448], Thread: 9176 [0x23d8]): Assertion failed '((regArgMaskLive & RBM_FLTARG_REGS) == 0) && "Homing of float argument registers with circular dependencies not implemented."' in 'System.Numerics.Vector:Abs[short](System.Numerics.Vector`1[short]):System.Numerics.Vector`1[short]' during 'Generate code' (IL size 185; hash 0xff7e0044; FullOpts) File: D:\a\_work\1\s\src\coreclr\jit\codegencommon.cpp Line: 3400 Image: C:\h\w\BF8C09A5\p\corerun.exe ``` Related? https://github.com/dotnet/runtime/issues/87511 https://github.com/dotnet/runtime/issues/87388
Author: BruceForstall
Assignees: -
Labels: `arch-arm64`, `os-windows`, `JitStress`, `area-CodeGen-coreclr`, `blocking-clean-ci-optional`
Milestone: 8.0.0
BruceForstall commented 1 year ago

@kunalspathak

kunalspathak commented 1 year ago

This seems to be related to https://github.com/dotnet/runtime/issues/87515 because I bisect the issue to https://github.com/dotnet/runtime/pull/85551

kunalspathak commented 1 year ago

@tannergooding

tannergooding commented 1 year ago

That would likely put it in the realm of https://github.com/dotnet/runtime/issues/87502, which is that there are some bits of code throughout the JIT that are making assumptions about the state/handling of SIMD and aren't doing it consistently.

This leads to downstream issues when the support is disabled, which can negatively impact R2R or other scenarios.

kunalspathak commented 1 year ago

This leads to downstream issues when the support is disabled, which can negatively impact R2R or other scenarios.

What is the action item here? How do we want to tackle it?

tannergooding commented 1 year ago

We need to identify the places that are making assumptions and ensure they are updated to "do the right thing".

There's effectively two types of code we can encounter:

Code that exists just as an optimization should respect the DOTNET_EnableHWIntrinsic=0 flag (and related baseline flags) and not light up if its off.

Code that exists for ABI purposes likely needs to ignore the DOTNET_EnableHWIntrinsic=0 flag (and related baseline flags) and emit the correct codegen/handling regardless. This is because its part of the baseline support and so is required to work in order for HFA/HVA handling, among many other factors.

kunalspathak commented 1 year ago

Thanks @tannergooding. I am assigning this to you for now.