ir3: fix freeing incorrect register in loops
While processing loop back edges, current live defs were freed through
their def pointer instead of correctly using get_def(). This may cause
the wrong register being freed when the current live def was reloaded.
Fixes: 21cd9b9557 ("ir3: implement RA for predicate registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27986>
This commit is contained in:
@@ -382,7 +382,7 @@ ra_block(struct ra_predicates_ctx *ctx, struct ir3_block *block)
|
||||
|
||||
/* Different def in the same register, free it first. */
|
||||
if (cur_def->def)
|
||||
free_reg(ctx, live, cur_def->def);
|
||||
free_reg(ctx, live, get_def(cur_def));
|
||||
|
||||
/* Reload the def in the required register right before the block's
|
||||
* terminator.
|
||||
|
||||
Reference in New Issue
Block a user