-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 'src1->OperIs(GT_LONG)' #8776
Comments
The relevant assert code is https://github.com/dotnet/coreclr/blob/3dd1c074f5d89533d8a8e13ea6143a4850752d3e/src/jit/lower.cpp#L2162-L2169 So we have a compare with long operands but the first hasn't been decomposed yet. Hmm... cc @dotnet/jit-contrib |
Self contained repro: enum LongEnum : long
{
Option0, Option1, Option2
}
[MethodImpl(MethodImplOptions.NoInlining)]
static string Test(LongEnum v)
{
string s;
switch (v)
{
case LongEnum.Option0: s = "Option0"; break;
case LongEnum.Option1: s = "Option1"; break;
case LongEnum.Option2: s = "Option2"; break;
default: throw new Exception();
}
return s;
} When compiled with optimizations disabled and run with RyuJIT-x86-Checked the assert fires. |
So we have
and after morph we have
Morph has retyped the lclvar node to So it gets the type from the lclvar desc. Morph has retyped the lclvar node but the lclvar itself is still We should probably get the type from the lclvar node instead: var_types tempLclType = genActualType(temp->TypeGet()); |
I repro this also. |
In the corefx tests as well or somewhere else? |
The CoreFX tests. I misread the report above - it's merely the same case. |
This also repros on |
Run
Windows_NT x86 Checked Build and Test (Jit - CoreFx)
CI tests will cause a failure on current master branch code:It should be introduced 3 days ago.
Please see the CI failure in this PR: dotnet/coreclr#13480
The text was updated successfully, but these errors were encountered: