From 19d4a622c525428048da221ef0282f903c4bd6f3 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Makarov" Date: Fri, 14 Jun 2024 15:09:02 -0400 Subject: [PATCH] Check scan_vars_num on MIR_MAX_COALESCE_VARS in consider_move_vars_only. --- mir-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mir-gen.c b/mir-gen.c index b17a5d73a3..85de5e9c94 100644 --- a/mir-gen.c +++ b/mir-gen.c @@ -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) {