We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca376e3 commit bf80e0eCopy full SHA for bf80e0e
src/coreclr/jit/optimizer.cpp
@@ -5851,6 +5851,14 @@ PhaseStatus Compiler::optVNBasedDeadStoreRemoval()
5851
continue;
5852
}
5853
5854
+ if (compIsAsync() && ((varDsc->TypeGet() == TYP_BYREF) ||
5855
+ ((varDsc->TypeGet() == TYP_STRUCT) && varDsc->GetLayout()->HasGCByRef())))
5856
+ {
5857
+ // A dead store to a byref local may not actually be dead if it
5858
+ // crosses a suspension point.
5859
+ continue;
5860
+ }
5861
+
5862
for (unsigned defIndex = 1; defIndex < defCount; defIndex++)
5863
{
5864
LclSsaVarDsc* defDsc = varDsc->lvPerSsaData.GetSsaDefByIndex(defIndex);
0 commit comments