From b3c61507a47f062baeaf6a20f1e2a90be6cc0d90 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 29 Apr 2022 18:50:57 +0300 Subject: [PATCH] Fixed possible incorrect splitting --- ir_ra.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ir_ra.c b/ir_ra.c index 8b5dfdf..8a43488 100644 --- a/ir_ra.c +++ b/ir_ra.c @@ -1121,6 +1121,12 @@ static ir_live_interval *ir_split_interval_at(ir_ctx *ctx, int v, ir_live_interv } IR_ASSERT(p); + if (pos < p->start) { + /* split between ranges */ + pos = p->start; + } + + use_pos = ival->use_pos; prev_use_pos = NULL;