diff --git a/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp b/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp index fd3a19531c..cbbb27644f 100644 --- a/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp @@ -30,6 +30,9 @@ void MergeBlocks::perform(PassPipelineExecutable& executable) if (executable.exported_blocks->contains(*entry.value.begin())) continue; + if (!entry.key->is_terminated()) + continue; + if (entry.key->terminator()->type() != Instruction::Type::Jump) continue;