Physical promotion invokes `fgForwardSubStatement`, providing its own
liveness information, meaning that early liveness is no longer the only
source of liveness information in this function. This made it possible
to hit an assert when early liveness was disabled via
`DOTNET_JitEnableEarlyLivenessRange`.
Remove the overeager assert and leave it up to the caller to ensure that
there is valid liveness information (`GTF_VAR_DEATH`) when forward sub
is invoked.
Fix #90295
// true if statement computation was forwarded.
// caller is responsible for removing the now-dead statement.
//
+// Remarks:
+// This requires locals to be linked (fgNodeThreading == AllLocals) and
+// liveness information to be up-to-date (specifically GTF_VAR_DEATH).
+//
bool Compiler::fgForwardSubStatement(Statement* stmt)
{
// Is this tree a def of a single use, unaliased local?
return false;
}
- // Cannot forward sub without liveness information.
- //
- assert(fgDidEarlyLiveness);
-
// And local is unalised
//
if (varDsc->IsAddressExposed())