-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
JIT: Assertion failed 'parent->OperGet() == oper' during 'LSRA allocate' #99810
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Thanks for the spmi collection. Will take a look. |
Here's a pipeline run with the failure: |
Looks like it doesn't require JitStress, just JitStressRegs=8: |
Failed in: runtime-coreclr jitstressregs 20240324.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr jitstressregs 20240331.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr jitstressregs 20240406.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr jitstressregs 20240414.1 Failed tests:
Error message:
Stack trace:
|
Failed in: runtime-coreclr jitstressregs 20240421.1 Failed tests:
Error message:
Stack trace:
|
We define 3 multi-reg for
At the use, we create this single tree node I am also wondering why we did not see similar situation in the past or perhaps the jitstressregs were restricting it from limiting the available regs under stress, making this situation less common or undiscovered. |
It turns out, we do mark the entire tree spilled when one or more allocated registers are spilled runtime/src/coreclr/jit/lsra.cpp Lines 8176 to 8185 in 28c39bc
and during unspill, already take care of that. runtime/src/coreclr/jit/codegenlinear.cpp Lines 2117 to 2129 in 28c39bc
As such the assert in the issue is not needed. I verified that the registers marked as
;; size=99 bbWeight=1 PerfScore 14.25
G_M8513_IG03: ;; offset=0x007C
call [SwiftRetAbiStress:SwiftRetFunc2():SwiftRetAbiStress+S2]
;; size=6 bbWeight=1 PerfScore 3.00
G_M8513_IG04: ;; offset=0x0082
mov dword ptr [rbp-0x5C], ecx
mov byte ptr [rbx+0x04], 1
cmp dword ptr [(reloc 0x10a83b6e0)], 0
je SHORT G_M8513_IG05
call CORINFO_HELP_STOP_FOR_GC
;; size=21 bbWeight=1 PerfScore 7.00
G_M8513_IG05: ;; offset=0x0097
mov r15, bword ptr [rbp-0x98]
mov qword ptr [rbx+0x08], r15
mov rbx, rax
mov qword ptr [rbp-0x40], rbx
mov r15d, edx
mov dword ptr [rbp-0x38], r15d
movss dword ptr [rbp-0x34], xmm0
mov ecx, dword ptr [rbp-0x5C]
mov r14d, ecx
mov dword ptr [rbp-0x30], r14d
mov rbx, qword ptr [rbp-0x40]
mov qword ptr [rbp-0x48], rbx
mov r15, 0x114C15560 ; Xunit.Sdk.AssertEqualityComparer`1[ulong] |
With
DOTNET_JitStress=2
andDOTNET_JitStressRegs=8
we hit this assert in some of the Swift tests.When we hit the assert, the LIR looks like the following:
The refPosition has
refPosition->reload == 1
, but the parent node (of[000038]
) is aGT_COPY
.I've attached an SPMI collection that repros the assertion on commit 0ea9b8f with
clrjit_unix_x64_x64.dll
-- pass-c 16
.maccol.zip
cc @kunalspathak -- any idea?
The text was updated successfully, but these errors were encountered: