diff --git a/src/codegen.cpp b/src/codegen.cpp index 912bca873b3eb0..73cc05f08a9ba3 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8505,7 +8505,7 @@ static jl_llvm_functions_t workstack.push_back(lname - 1); come_from_bb[cursor+1] = ctx.builder.GetInsertBlock(); ctx.builder.CreateDetach(BB[cursor+2], BB[lname], syncregion.V); - find_next_stmt(lname - 1); + find_next_stmt(cursor + 1); continue; } if (jl_is_reattachnode(stmt)) {