ir3: fix handling of early clobbers in calc_min_limit_pressure

Early clobbers should always add to the register pressure since they
cannot overlap with sources. handle_instr in ir3_spill.c handles this
properly but calc_min_limit_pressure did not.

Fixes: 2ff5826f09 ("ir3/ra: Add IR3_REG_EARLY_CLOBBER")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
This commit is contained in:
Job Noorman 2024-06-17 11:34:25 +02:00 committed by Marge Bot
parent 023c7351f2
commit af6f82b954

View file

@ -2452,7 +2452,8 @@ calc_min_limit_pressure(struct ir3_shader_variant *v,
cur_pressure = (struct ir3_pressure) {0};
ra_foreach_dst (dst, instr) {
if (dst->tied && !(dst->tied->flags & IR3_REG_KILL))
if ((dst->tied && !(dst->tied->flags & IR3_REG_KILL)) ||
(dst->flags & IR3_REG_EARLY_CLOBBER))
add_pressure(&cur_pressure, dst, v->mergedregs);
}