From 245460bda58ac35c94bd631f033ca82fe324c446 Mon Sep 17 00:00:00 2001 From: Jakob Sinclair Date: Mon, 13 Apr 2026 11:06:10 +0200 Subject: [PATCH] pan/compiler: Do not assume split 64-bit registers in va_mark_last va_mark_last currently expects 64-bit registers to always be split in two, this commit changes it to check first if a 64-bit register is split or not. Reviewed-by: Lars-Ivar Hesselberg Simonsen Part-of: --- src/panfrost/compiler/bifrost/valhall/va_mark_last.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/panfrost/compiler/bifrost/valhall/va_mark_last.c b/src/panfrost/compiler/bifrost/valhall/va_mark_last.c index bc6742c8b24..0bfe93ce228 100644 --- a/src/panfrost/compiler/bifrost/valhall/va_mark_last.c +++ b/src/panfrost/compiler/bifrost/valhall/va_mark_last.c @@ -178,7 +178,9 @@ va_mark_last(bi_context *ctx) if (s >= 3) break; - if (va_src_info(I->op, s).size == VA_SIZE_64) { + /* Only need to unmark split registers. */ + if (va_src_info(I->op, s).size == VA_SIZE_64 && + bi_count_read_registers(I, s) == 1) { bool both_discard = I->src[s].discard && I->src[s + 1].discard; I->src[s + 0].discard = both_discard;