mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
Fix support for "long" PHIs
This commit is contained in:
parent
3ef58e5c2e
commit
c74cac2556
12
ir_gcm.c
12
ir_gcm.c
@ -78,7 +78,17 @@ static void ir_gcm_schedule_late(ir_ctx *ctx, uint32_t *_blocks, ir_bitset visit
|
||||
} else if (insn->op3 == ref) {
|
||||
b = _blocks[ctx->ir_base[insn->op1].op2];
|
||||
} else {
|
||||
IR_ASSERT(0);
|
||||
ir_ref j, n, *p;
|
||||
|
||||
b = 0;
|
||||
n = ir_input_edges_count(ctx, insn);
|
||||
for (j = 4, p = insn->ops + 4; j <= n; j++, p++) {
|
||||
if (*p == ref) {
|
||||
b = _blocks[ctx->ir_base[insn->op1].ops[j]];
|
||||
break;
|
||||
}
|
||||
}
|
||||
IR_ASSERT(b != 0);
|
||||
}
|
||||
}
|
||||
lca = !lca ? b : ir_gcm_find_lca(ctx, lca, b);
|
||||
|
Loading…
Reference in New Issue
Block a user