From c599cfbdf345bcaaa802ff0e4176c5e3ec3e3c23 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 7 Jun 2023 18:37:37 +0300 Subject: [PATCH] Fixed spill slot allocation --- ir_ra.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ir_ra.c b/ir_ra.c index b534894..82c28b9 100644 --- a/ir_ra.c +++ b/ir_ra.c @@ -3407,6 +3407,11 @@ static int ir_linear_scan(ir_ctx *ctx) if (unhandled && ival->end > unhandled->range.start) { ival->list_next = active; active = ival; + } else { + size = ir_type_size[ival->type]; + IR_ASSERT(size == 1 || size == 2 || size == 4 || size == 8); + ival->list_next = handled[size]; + handled[size] = ival; } } }