From 0a5bb4a571f31a8bafa35238a1a7557449a04601 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 2 Nov 2022 21:28:56 +0300 Subject: [PATCH] Better condition --- ir_ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir_ra.c b/ir_ra.c index 08030ce..1e12b09 100644 --- a/ir_ra.c +++ b/ir_ra.c @@ -773,7 +773,7 @@ static bool ir_try_coalesce(ir_ctx *ctx, ir_live_range **unused, ir_ref from, ir } else if ((f2 & IR_LIVE_INTERVAL_COALESCED) && !(f1 & IR_LIVE_INTERVAL_COALESCED)) { ir_vregs_join(ctx, unused, v2, v1); ctx->vregs[from] = v2; - } else if (v1 < v2) { + } else if (from < to) { ir_vregs_join(ctx, unused, v1, v2); if (f2 & IR_LIVE_INTERVAL_COALESCED) { for (i = 0; i < ctx->insns_count; i++) {