Skip to content

Commit de67239

Browse files
committed
Only deduplicate Resume terminators
1 parent e5ebdd8 commit de67239

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_mir_transform/src/deduplicate_blocks.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ fn find_duplicates(body: &Body<'_>, limit: usize) -> FxHashMap<BasicBlock, Basic
8686
continue;
8787
}
8888

89+
if bbd.terminator().kind != TerminatorKind::Return {
90+
continue;
91+
}
92+
8993
let to_hash = BasicBlockHashable { basic_block_data: bbd };
9094
let entry = same_hashes.entry(to_hash);
9195
match entry {

0 commit comments

Comments
 (0)