Open yowl opened 2 weeks ago
It looks like we need to add the local to the live-in set of the first block here: https://github.com/dotnet/runtimelab/blob/e80eec3fbb94e44157d16a542f89281eb43cab0d/src/coreclr/jit/llvmlssa.cpp#L984-L990
VarSetOps::AddElemD(m_compiler, m_compiler->fgFirstBB->bbLiveIn, varDsc->lvVarIndex);
Sorry, not sure I've got this right, sometimes lvaTrackedCount
is 0
which causes an assert?
Yes, that's correct. It should be guarded by varDsc->lvTracked
.
This IL seems to cause an assert
at https://github.com/dotnet/runtimelab/blob/409591fa1363a89d1bbce4daf7ab1a414de8b3df/src/coreclr/jit/llvmcodegen.cpp#L1191
Haven't done any more investigation