From: Andy Ayers Date: Thu, 6 Aug 2020 19:01:01 +0000 (-0700) Subject: JIT: Properly handle a switch opt case during early flow opts (#40434) X-Git-Tag: submit/tizen/20210909.063632~6177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89788004d214b64b3e70542e24e3470621766bc2;p=platform%2Fupstream%2Fdotnet%2Fruntime.git JIT: Properly handle a switch opt case during early flow opts (#40434) Don't try rethreading statement lists if we're doing and early flow opt. Fixes #40195. --- diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index 89ce176..242a4c5 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -14704,9 +14704,9 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block) LIR::ReadOnlyRange range(zeroConstNode, switchTree); m_pLowering->LowerRange(block, range); } - else + else if (fgStmtListThreaded) { - // Re-link the nodes for this statement. + gtSetStmtInfo(switchStmt); fgSetStmtSeq(switchStmt); }