-
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
Assertion failed 'unreached' in 'MyClass:Foo(System.Numerics.Vector`1[Single]):this' during 'Do value numbering' (IL size 9) #51500
Comments
@dotnet/jit-contrib , @briansull |
Reproduction: [MethodImpl(MethodImplOptions.NoInlining)]
private static void Problem()
{
VectorDefault(new Vector<float>());
}
[MethodImpl(MethodImplOptions.NoInlining)]
static void VectorDefault<T>(T d)
{
d = default(T);
} Taking a closer look... |
The issue is here: runtime/src/coreclr/jit/valuenum.cpp Lines 7483 to 7495 in 2aba0c5
The relevant statement: N004 ( 9, 7) [000003] IA--G------- * ASG simd16 (init)
N002 ( 7, 5) [000005] *---G--N---- +--* OBJ simd16<System.Numerics.Vector`1[Single]>
N001 ( 1, 1) [000000] -------N---- | \--* LCL_VAR byref V00 arg0 u:1 (last use)
N003 ( 1, 1) [000002] ------------ \--* CNS_INT int 0 So, we have As I am not an expert in this area, deferring the judgement on the proper fix to people who are. |
This is a common IR idiom for zero-initialization of a struct (one might prefer to see a struct (or simd)-typed zero, but we use an int). Suspect you should you skip trees where |
That sounds reasonable. Looks like the code in that branch was never prepared to handle runtime/src/coreclr/jit/valuenum.cpp Line 7682 in 2aba0c5
@AndyAyersMS I will see what I can do here, and hopefully learn something along the way, so I suppose you can assign me to this one. |
Do we know why we just started seeing this, or was it just always there and the SPMI run was the first time we noticed? |
Probably. We never ran SPMI on libraries tests. I noticed this while working on that pipeline. I am talking to @BruceForstall on how to surface these failures. |
|
Triage Area: ValueNumbering |
Added @jakobbotsch |
Looks like @echesakovMSFT ended up fixing the original repro with #53116, gonna see if I can find a different repro before I close this. |
I haven't managed to find one, it looks like all places where we have a struct assignment on the left we call |
Gets the assertion failure on windows/x64 when doing superpmi collection of
System.Dynamic.Runtime.Tests.dll
.Repro steps:
The text was updated successfully, but these errors were encountered: