You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: Incorrect last use propagation for implicit byrefs when undoing promotion #80488
lclNode->SetAllEffectsFlags(GTF_EMPTY); // Implicit by-ref parameters cannot be address-exposed.
lclNode->gtFlags |= lastUse;
is not quite correct. Liveness sets GTF_VAR_DEATH on a promoted struct local if any of its fields are dying, but we can only know that the implicit byref local is dying if all of its fields are. Noticed this while trying to revive #78818.
usingSystem;usingSystem.Runtime.CompilerServices;classEarlyLiveness_ImplicitByRefPropagation{staticintMain(string[]args){intcode=Foo(newS16{F1=100});if(code!=100){Console.WriteLine("FAIL: Returned {0}",code);}returncode;}[MethodImpl(MethodImplOptions.NoInlining)]privatestaticintFoo(S16s){Bar(s);return(int)s.F1;}[MethodImpl(MethodImplOptions.NoInlining)]privatestaticvoidBar(S16s){s.F1=12345;Consume(s);}[MethodImpl(MethodImplOptions.NoInlining)]privatestaticvoidConsume(S16s){}privatestructS16{publiclongF0,F1;}}
Activity