diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index f375d11966058..fb0c8f231385f 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -175,6 +175,8 @@ void Compiler::fgInit() #ifdef FEATURE_SIMD fgPreviousCandidateSIMDFieldAsgStmt = nullptr; #endif + + fgHasSwitch = false; } bool Compiler::fgHaveProfileData() @@ -476,7 +478,8 @@ void Compiler::fgEnsureFirstBBisScratch() noway_assert(fgLastBB != nullptr); - block->bbFlags |= (BBF_INTERNAL | BBF_IMPORTED); + // Set the expected flags + block->bbFlags |= (BBF_INTERNAL | BBF_IMPORTED | BBF_JMP_TARGET | BBF_HAS_LABEL); // This new first BB has an implicit ref, and no others. block->bbRefs = 1;