From eaec57ab6b5a2698948a92ca5c7b34c5bbf279c6 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Mon, 17 Jun 2024 11:34:25 +0200 Subject: [PATCH] ir3: don't remove intervals for non-killed tex prefetch sources Fixes: 613eaac7b53 ("ir3: Initial support for spilling non-shared registers") Signed-off-by: Job Noorman Part-of: --- src/freedreno/ir3/ir3_spill.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3_spill.c b/src/freedreno/ir3/ir3_spill.c index e8d24475561..f2839b6ba2a 100644 --- a/src/freedreno/ir3/ir3_spill.c +++ b/src/freedreno/ir3/ir3_spill.c @@ -1325,8 +1325,10 @@ remove_input_phi(struct ra_spill_ctx *ctx, struct ir3_instruction *instr) return; if (instr->opc == OPC_META_TEX_PREFETCH) { - ra_foreach_src (src, instr) - remove_src(ctx, instr, src); + ra_foreach_src (src, instr) { + if (src->flags & IR3_REG_FIRST_KILL) + remove_src(ctx, instr, src); + } } if (instr->dsts[0]->flags & IR3_REG_UNUSED) remove_dst(ctx, instr->dsts[0]);