From af6f82b954a1581e448a1af47de32fd057b81a00 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Mon, 17 Jun 2024 11:34:25 +0200 Subject: [PATCH] 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: 2ff5826f09d ("ir3/ra: Add IR3_REG_EARLY_CLOBBER") Signed-off-by: Job Noorman Part-of: --- src/freedreno/ir3/ir3_ra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 07c91f758d4..adb996b54ad 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -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); }