ir3/shared_ra: fix live-out reload after src reload
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

When reloading live-out values along loop back-edges, we make sure to
reuse the original register. However, we failed to detect cases where
the spilled value got reloaded earlier for a src in a different
register. Fix this by reloading the value again in the original
register.

Fixes a RA validation failure in Windrose.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41262>
This commit is contained in:
Job Noorman 2026-04-29 14:13:07 +02:00 committed by Marge Bot
parent 3a8d5aeaa1
commit aaf4d77f43

View file

@ -1246,7 +1246,9 @@ reload_live_outs(struct ra_ctx *ctx, struct ir3_block *block)
struct ir3_register *reg = ctx->live->definitions[name];
struct ra_interval *interval = &ctx->intervals[name];
if (!interval->interval.inserted) {
if (!interval->interval.inserted ||
(interval->spill_def &&
interval->physreg_start != interval->physreg_start_orig)) {
d("reloading %d at end of backedge", reg->name);
/* When this interval was spilled inside the loop, we probably chose a