Skip to content

Commit 8b39338

Browse files
AndyAyersMSJacksondr5
authored andcommitted
JIT: Properly handle a switch opt case during early flow opts (dotnet#40434)
Don't try rethreading statement lists if we're doing and early flow opt. Fixes dotnet#40195.
1 parent c393da2 commit 8b39338

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)