diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index e0b7e630a9659f..f93af11a09e015 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -15333,6 +15333,12 @@ bool Compiler::fgOptimizeBranch(BasicBlock* bJump) // Clone/substitute the expression. Statement* stmt = gtCloneStmt(curStmt); + if (fgStmtListThreaded) + { + gtSetStmtInfo(stmt); + fgSetStmtSeq(stmt); + } + // cloneExpr doesn't handle everything. if (stmt == nullptr) {