Skip to content

Commit e05182f

Browse files
authored
gh-138250: load fast optimization should fall through to empty blocks (#138249)
load fast optimization should fall through to empty blocks
1 parent 5f79067 commit e05182f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Python/flowgraph.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,11 +2993,8 @@ optimize_load_fast(cfg_builder *g)
29932993
}
29942994

29952995
// Push fallthrough block
2996-
cfg_instr *term = basicblock_last_instr(block);
2997-
if (term != NULL && block->b_next != NULL &&
2998-
!(IS_UNCONDITIONAL_JUMP_OPCODE(term->i_opcode) ||
2999-
IS_SCOPE_EXIT_OPCODE(term->i_opcode))) {
3000-
assert(BB_HAS_FALLTHROUGH(block));
2996+
if (BB_HAS_FALLTHROUGH(block)) {
2997+
assert(block->b_next != NULL);
30012998
load_fast_push_block(&sp, block->b_next, refs.size);
30022999
}
30033000

0 commit comments

Comments
 (0)