-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
codegenarmarch.cpp:3201 Assertion failed '(gcInfo.gcRegGCrefSetCur & killMask) == 0' #65395
Comments
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsI incorrectly closed these as dups of #65311 but it looks like it's a different assert:
|
cc @dotnet/jit-contrib |
I have seen this in #64857 - bisecting now |
Note that these are all JitStressRegs=2/3 |
Looks that these asserts were changed in 3fc8b09 (#63763) and they were failing since then. Here is how to reproduce the issue
cc @jakobbotsch |
Revert these particular fragments back to what they were before CFG. This should fix outerloop but I will need to take a closer look tomorrow as this particular code is not right for the CFG validator. Fix dotnet#65395
Slightly smaller repro with arm altjit and JitStress=2, JitStressRegs=2: using System.Numerics;
using System.Runtime.CompilerServices;
public class Program
{
public static void Main()
{
Matrix<float> foo = default;
foo = foo * foo;
}
public struct Matrix<T> where T : struct
{
private T[] _data;
public int xCount, yCount;
private int _xTileCount;
private int _yTileCount;
private int _flattenedCount;
private static readonly int s_tileSize = Vector<T>.Count;
public Matrix(int theXCount, int theYCount)
{
// Round up the dimensions so that we don't have to deal with remnants.
int vectorCount = Vector<T>.Count;
_xTileCount = (theXCount + vectorCount - 1) / vectorCount;
_yTileCount = (theYCount + vectorCount - 1) / vectorCount;
xCount = _xTileCount * vectorCount;
yCount = _yTileCount * vectorCount;
_flattenedCount = xCount * yCount;
_data = new T[_flattenedCount];
}
[MethodImpl(MethodImplOptions.NoInlining)]
public static void Transpose(Matrix<T> m, int xStart, int yStart, Vector<T>[] result)
{
}
public static Matrix<T> operator *(Matrix<T> left, Matrix<T> right)
{
Matrix<T> result = new Matrix<T>(left.xCount, right.yCount);
Vector<T>[] temp = new Vector<T>[s_tileSize];
T[] temp2 = new T[s_tileSize];
Transpose(right, 0, 0, temp);
Vector<T> leftTileRow = new Vector<T>(left._data, left.yCount);
for (int n = 0; n < s_tileSize; n++)
{
temp2[n] = Vector.Dot(leftTileRow, temp[n]);
}
new Vector<T>(result._data, result.yCount);
return result;
}
}
} |
In the stress mode we end up with a series of spills/reload around setting up call arguments: 0000EE 9839 ldr r0, [sp+0xe4] // [V02 arg1]
0000F0 993A ldr r1, [sp+0xe8] // [V02 arg1+0x04]
0000F2 9A3B ldr r2, [sp+0xec] // [V02 arg1+0x08]
0000F4 9B3C ldr r3, [sp+0xf0] // [V02 arg1+0x0c]
0000F6 900D str r0, [sp+0x34] // [TEMP_02]
0000F8 F642 10B0 movw r0, 0x29b0
0000FC F6C0 0073 movt r0, 0x873
000100 900C str r0, [sp+0x30] // [TEMP_01]
000102 980D ldr r0, [sp+0x34] // [TEMP_02]
000104 F8DD C030 ldr r12, [sp+0x30] // [TEMP_01]
000108 47E0 blx r12 // Matrix`1[Single][System.Single]:Transpose(Matrix`1[Single],int,int,System.Numerics.Vector`1[System.Single][]) It looks like runtime/src/coreclr/jit/codegenlinear.cpp Lines 1818 to 1829 in 87ab863
We can either go back to this or update GC info as part of consuming the arg split node. I am more inclined to do the latter to put it in line with how we do GC reporting for other arg nodes. |
I incorrectly closed these as dups of #65311
#65283
#65284
#65285
#65286
but it looks like it's a different assert:
The text was updated successfully, but these errors were encountered: