Skip to content

Commit 19d4a62

Browse files
committed
Check scan_vars_num on MIR_MAX_COALESCE_VARS in consider_move_vars_only.
1 parent 4cd05d9 commit 19d4a62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mir-gen.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6131,7 +6131,7 @@ static int consider_move_vars_only (gen_ctx_t gen_ctx) {
61316131
bitmap_clear (temp_bitmap);
61326132
scan_vars_num = 0;
61336133
scan_collected_moves (gen_ctx);
6134-
return scan_vars_num > 0;
6134+
return scan_vars_num > 0 && scan_vars_num < MIR_MAX_COALESCE_VARS;
61356135
}
61366136

61376137
static void add_bb_insn_dead_vars (gen_ctx_t gen_ctx) {

0 commit comments

Comments
 (0)