From cb93fe85b9fbfe39756bf69fb44bcb615bf96fbf Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Mar 2026 18:09:42 -0400 Subject: [PATCH] pan/bi/ra: Allow offsets on tied sources The only real requirement here is that the destination offset is zero and that the destination is big enough to hold the source. The source offset doesn't matter. Fixes: bc17288697f8 ("pan/bi: Lower split/collect before RA") Reviewed-by: Lorenzo Rossi (cherry picked from commit 05c5e52054ff41bfbe47c86d08d61246a40c899a) Part-of: --- .pick_status.json | 2 +- src/panfrost/compiler/bifrost/bi_ra.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c208c218835..fdda3c95747 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3954,7 +3954,7 @@ "description": "pan/bi/ra: Allow offsets on tied sources", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "bc17288697f87830f533c2a55ba3503e7423d53a", "notes": null diff --git a/src/panfrost/compiler/bifrost/bi_ra.c b/src/panfrost/compiler/bifrost/bi_ra.c index ecf070906b6..dda304211b0 100644 --- a/src/panfrost/compiler/bifrost/bi_ra.c +++ b/src/panfrost/compiler/bifrost/bi_ra.c @@ -918,13 +918,12 @@ bi_coalesce_tied(bi_context *ctx) bi_builder b = bi_init_builder(ctx, bi_before_instr(I)); unsigned n = bi_count_read_registers(I, 0); + bi_index dst = I->dest[0], src = I->src[0]; + assert(dst.offset == 0); for (unsigned i = 0; i < n; ++i) { - bi_index dst = I->dest[0], src = I->src[0]; - - assert(dst.offset == 0 && src.offset == 0); - dst.offset = src.offset = i; - bi_mov_i32_to(&b, dst, src); + dst.offset++; + src.offset++; } bi_replace_src(I, 0, I->dest[0]);