Skip to content

Commit 8978800

Browse files
authored
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.
1 parent 0adf9b5 commit 8978800

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coreclr/src/jit/flowgraph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14704,9 +14704,9 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block)
1470414704
LIR::ReadOnlyRange range(zeroConstNode, switchTree);
1470514705
m_pLowering->LowerRange(block, range);
1470614706
}
14707-
else
14707+
else if (fgStmtListThreaded)
1470814708
{
14709-
// Re-link the nodes for this statement.
14709+
gtSetStmtInfo(switchStmt);
1471014710
fgSetStmtSeq(switchStmt);
1471114711
}
1471214712

0 commit comments

Comments
 (0)