Fixed inactive interval splitting

This commit is contained in:
Dmitry Stogov 2023-06-27 15:48:35 +03:00
parent b9fc218604
commit 1b88d998c8

View File

@ -3106,12 +3106,12 @@ spill_current:
IR_ASSERT(other->type != IR_VOID); IR_ASSERT(other->type != IR_VOID);
IR_LOG_LSRA_CONFLICT(" ---- Conflict with inactive", other, overlap); IR_LOG_LSRA_CONFLICT(" ---- Conflict with inactive", other, overlap);
// TODO: optimal split position (this case is not tested) // TODO: optimal split position (this case is not tested)
child = ir_split_interval_at(ctx, other, overlap);
if (prev) { if (prev) {
prev->list_next = other = other->list_next; prev->list_next = other = other->list_next;
} else { } else {
*inactive = other = other->list_next; *inactive = other = other->list_next;
} }
child = ir_split_interval_at(ctx, other, overlap);
ir_add_to_unhandled(unhandled, child); ir_add_to_unhandled(unhandled, child);
IR_LOG_LSRA(" ---- Queue", child, ""); IR_LOG_LSRA(" ---- Queue", child, "");
continue; continue;