ir3: Fix list corruption in legalize_block()

We forgot to remove the instruction under consideration from instr_list
before inserting it into the block's list, which caused instr_list to
become corrupted. This happened to work but caused further corruption in
some rare scenarios.

Fixes: adf1659 ("freedreno/ir3: use standard list implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7573>
This commit is contained in:
Connor Abbott 2020-11-10 11:50:29 +01:00
parent f601fd635b
commit 8e11f0560e

View file

@ -243,6 +243,7 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
samgp->flags |= IR3_INSTR_SY;
}
} else {
list_delinit(&n->node);
list_addtail(&n->node, &block->instr_list);
}