diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index 89ce176fe02485..242a4c56791e2e 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); }