mirror of
https://github.com/danog/ir.git
synced 2024-11-26 20:34:53 +01:00
Fix loop termination condition
This commit is contained in:
parent
3c4135576a
commit
999d7d6aa9
3
ir_gcm.c
3
ir_gcm.c
@ -95,8 +95,7 @@ static void ir_gcm_schedule_late(ir_ctx *ctx, uint32_t *_blocks, ir_bitset visit
|
||||
lca = !lca ? b : ir_gcm_find_lca(ctx, lca, b);
|
||||
}
|
||||
b = lca;
|
||||
|
||||
while (lca != ctx->cfg_blocks[_blocks[ref]].dom_parent) {
|
||||
while (ctx->cfg_blocks[b].loop_depth && lca != ctx->cfg_blocks[_blocks[ref]].dom_parent) {
|
||||
if (ctx->cfg_blocks[lca].loop_depth < ctx->cfg_blocks[b].loop_depth) {
|
||||
b = lca;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user