Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Nov 5, 2024
1 parent f05c09b commit b7acb47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions third_party/move/move-model/bytecode/src/fat_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,8 @@ impl FatLoopBuilder {
.collect();
let mut results = vec![];
for (i, (block_id, block)) in blocks.iter().enumerate() {
// if this block has one successor and the last bc of this block is not a branch
// we need to check whether the next block is the successor,
// if not, insert a jump to the correct block
// if this block is a fallthough block, we need to remove it by inserting a jump to the correct block
// because the fatloop algorithm doesn't support fallthrough
if cfg.successors(*block_id).len() == 1 && !block[block.len() - 1].is_branching() {
let successor_id = cfg.successors(*block_id).first().unwrap();
let successor_label_opt = id_label_map.get(successor_id);
Expand Down

0 comments on commit b7acb47

Please sign in to comment.