message: Don't use last instrction in the block after removing it
  Summary: Asan report P81609709
diff: @@ -2066,8 +2066,15 @@ void ControlFlowGraph::remove_insn(const InstructionIterator& it) {
  always_assert_log(op != OPCODE_GOTO,
  "There are no GOTO instructions in the CFG");
  Block* block = it.block();
  +
  auto last_it = block->get_last_insn();
  always_assert_log(last_it != block->end(), "cannot remove from empty block");
  + if (insn == last_it->insn && (opcode::may_throw(op) || op == OPCODE_THROW)) {
  + // We're deleting the last instruction that may throw, this block no longer
  + // throws. We should remove the throw edges
  + delete_succ_edge_if(block,
  + [](const Edge* e) { return e->type() == EDGE_THROW; });
  + }
  if (is_conditional_branch(op) || is_switch(op)) {
  // Remove all outgoing EDGE_BRANCHes
  @@ -2114,13 +2121,6 @@ void ControlFlowGraph::remove_insn(const InstructionIterator& it) {
  }
  }
  - if (insn == last_it->insn && (opcode::may_throw(op) || op == OPCODE_THROW)) {
  - // We're deleting the last instruction that may throw, this block no longer
  - // throws. We should remove the throw edges
  - delete_succ_edge_if(block,
  - [](const Edge* e) { return e->type() == EDGE_THROW; });
  - }
  -
  // delete the requested instruction
  block->m_entries.erase_and_dispose(it.unwrap());
  }
  