mirror of
https://github.com/danog/ir.git
synced 2025-01-22 13:41:11 +01:00
Sort oputput UsePos after inputs
This commit is contained in:
parent
7f8f186abd
commit
59b63cbb91
4
ir_ra.c
4
ir_ra.c
@ -194,7 +194,9 @@ static void ir_add_use_pos(ir_ctx *ctx, int v, ir_use_pos *use_pos)
|
||||
ir_use_pos *prev = NULL;
|
||||
ir_use_pos *p = ival->use_pos;
|
||||
|
||||
while (p && (p->pos < use_pos->pos || (p->pos == use_pos->pos && p->op_num < use_pos->op_num))) {
|
||||
while (p && (p->pos < use_pos->pos ||
|
||||
(p->pos == use_pos->pos &&
|
||||
(use_pos->op_num == 0 || p->op_num < use_pos->op_num)))) {
|
||||
prev = p;
|
||||
p = p->next;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user