Skip to content

Commit

Permalink
Check scan_vars_num on MIR_MAX_COALESCE_VARS in consider_move_vars_only.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmakarov committed Jun 14, 2024
1 parent 4cd05d9 commit 19d4a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mir-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -6131,7 +6131,7 @@ static int consider_move_vars_only (gen_ctx_t gen_ctx) {
bitmap_clear (temp_bitmap);
scan_vars_num = 0;
scan_collected_moves (gen_ctx);
return scan_vars_num > 0;
return scan_vars_num > 0 && scan_vars_num < MIR_MAX_COALESCE_VARS;
}

static void add_bb_insn_dead_vars (gen_ctx_t gen_ctx) {
Expand Down

0 comments on commit 19d4a62

Please sign in to comment.