Fix inerval flags reseting after coalescing

This commit is contained in:
Dmitry Stogov 2023-10-13 13:57:48 +03:00
parent 62b6ddf149
commit 9c4cabd19d

View File

@ -1587,7 +1587,9 @@ static void ir_vregs_join(ir_ctx *ctx, uint32_t r1, uint32_t r2)
ctx->live_intervals[r1]->flags |=
IR_LIVE_INTERVAL_COALESCED | (ival->flags & (IR_LIVE_INTERVAL_HAS_HINT_REGS|IR_LIVE_INTERVAL_HAS_HINT_REFS));
ctx->live_intervals[r1]->flags &= ~(IR_LIVE_INTERVAL_MEM_PARAM|IR_LIVE_INTERVAL_MEM_LOAD);
if (ctx->ir_base[IR_LIVE_POS_TO_REF(ctx->live_intervals[r1]->use_pos->pos)].op != IR_VLOAD) {
ctx->live_intervals[r1]->flags &= ~IR_LIVE_INTERVAL_MEM_LOAD;
}
ctx->live_intervals[r2] = NULL;
// TODO: remember to reuse ???